()
| 474 | } |
| 475 | |
| 476 | func (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 | } |
no test coverage detected