cmd: daemon: use closure-local variable when starting job
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ func (d *Daemon) Loop() {
|
|||||||
ctx = context.WithValue(ctx, contextKeyLog, logger)
|
ctx = context.WithValue(ctx, contextKeyLog, logger)
|
||||||
|
|
||||||
go func(j Job) {
|
go func(j Job) {
|
||||||
job.JobStart(ctx)
|
j.JobStart(ctx)
|
||||||
finishs <- j
|
finishs <- j
|
||||||
}(job)
|
}(job)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user