fixes for job shop main slaves
This commit is contained in:
parent
38fdbb8c32
commit
c5dddf20f0
8
job.go
8
job.go
@ -2248,7 +2248,7 @@ func jobShopsSlave(j Job) {
|
||||
b2 := getJobPayloadUnsafe(p.JobCallbackID64)
|
||||
var p2 JobPayloadShops
|
||||
err = json.Unmarshal(b2, &p2)
|
||||
p2.Msgs = append(p2.Msgs, m)
|
||||
p2.Msgs = append(p2.Msgs, *m)
|
||||
err = setJobPayloadJSONUnsafe(p.JobCallbackID64, p2)
|
||||
logOnError(err, "jobShopsSlave : setJobPayloadJSONUnsafe")
|
||||
muxObjJob.Unlock()
|
||||
@ -2263,13 +2263,13 @@ func jobShopsSlave(j Job) {
|
||||
b2 := getJobPayloadUnsafe(p.JobCallbackID64)
|
||||
var p2 JobPayloadShops
|
||||
err = json.Unmarshal(b2, &p2)
|
||||
p2.Msgs = append(p2.Msgs, m)
|
||||
p2.Msgs = append(p2.Msgs, *m)
|
||||
err = setJobPayloadJSONUnsafe(p.JobCallbackID64, p2)
|
||||
muxObjJob.Unlock()
|
||||
|
||||
for i, link := range p.Shops {
|
||||
if cwm.Link == link {
|
||||
p.Shops = append(p.Shops[:i], p.Shops[i+1:])
|
||||
p.Shops = append(p.Shops[:i], p.Shops[i+1:]...)
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -2299,7 +2299,7 @@ func jobShopsSlave(j Job) {
|
||||
|
||||
// if last job to finish then we wake up the master
|
||||
if p2.Status == p.Slaves {
|
||||
rescheduleJob(j.JobCallbackID64, 0, time.Now().UTC())
|
||||
rescheduleJob(p.JobCallbackID64, 0, time.Now().UTC())
|
||||
}
|
||||
|
||||
err = setJobDone(j.ID64)
|
||||
|
Loading…
Reference in New Issue
Block a user