MCPcopy
hub / github.com/tuna/tunasync / fetchJobStatus

Method fetchJobStatus

worker/worker.go:476–487  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

474}
475
476func (w *Worker) fetchJobStatus() []MirrorStatus {
477 var mirrorList []MirrorStatus
478 apiBase := w.cfg.Manager.APIBaseList()[0]
479
480 url := fmt.Sprintf("%s/workers/%s/jobs", apiBase, w.Name())
481
482 if _, err := GetJSON(url, &mirrorList, w.httpClient); err != nil {
483 logger.Errorf("Failed to fetch job status: %s", err.Error())
484 }
485
486 return mirrorList
487}

Callers 1

runScheduleMethod · 0.95

Calls 5

NameMethod · 0.95
GetJSONFunction · 0.85
APIBaseListMethod · 0.80
ErrorfMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected