1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-06 06:26:46 +00:00

Move the WebMirrorStatus to internal package. Fix the list command of tunasynctl

这个提交包含在:
Yuxiang Zhang
2018-05-29 18:48:33 +08:00
父节点 a475b044c6
当前提交 4fe7d03e54
共有 4 个文件被更改,包括 14 次插入19 次删除

查看文件

@@ -140,8 +140,7 @@ func listWorkers(c *cli.Context) error {
}
func listJobs(c *cli.Context) error {
// FIXME: there should be an API on manager server side that return MirrorStatus list to tunasynctl
var jobs []tunasync.MirrorStatus
var jobs []tunasync.WebMirrorStatus
if c.Bool("all") {
_, err := tunasync.GetJSON(baseURL+listJobsPath, &jobs, client)
if err != nil {
@@ -158,10 +157,10 @@ func listJobs(c *cli.Context) error {
fmt.Sprintf("Usage Error: jobs command need at"+
" least one arguments or \"--all\" flag."), 1)
}
ans := make(chan []tunasync.MirrorStatus, len(args))
ans := make(chan []tunasync.WebMirrorStatus, len(args))
for _, workerID := range args {
go func(workerID string) {
var workerJobs []tunasync.MirrorStatus
var workerJobs []tunasync.WebMirrorStatus
_, err := tunasync.GetJSON(fmt.Sprintf("%s/workers/%s/jobs",
baseURL, workerID), &workerJobs, client)
if err != nil {