worker/api: send job id to worker after all

Full circle. After switching the worker to not operate on jobs directly,
send the id anyway, so that workers can print it in their logs.
This commit is contained in:
Lars Karlitski 2020-09-08 20:49:17 +02:00 committed by Tom Gundersen
parent b03e1254e9
commit 3bedd25087
6 changed files with 25 additions and 9 deletions

View file

@ -253,7 +253,7 @@ func main() {
log.Fatal(err)
}
fmt.Printf("Running next job\n")
fmt.Printf("Running job %v\n", job.Id())
ctx, cancel := context.WithCancel(context.Background())
go WatchJob(ctx, job)
@ -285,7 +285,7 @@ func main() {
// flag to indicate all error kinds.
result.Success = false
} else {
log.Printf(" 🎉 Job completed successfully")
log.Printf(" 🎉 Job completed successfully: %v", job.Id())
status = common.IBFinished
}