Manager: broadcast job/task updates in a separate goroutine
This commit is contained in:
parent
cfab4f5b76
commit
cd28ef552e
@ -109,7 +109,7 @@ func (sm *StateMachine) taskStatusChangeOnly(
|
|||||||
// Broadcast this change to the SocketIO clients.
|
// Broadcast this change to the SocketIO clients.
|
||||||
taskUpdate := webupdates.NewTaskUpdate(task)
|
taskUpdate := webupdates.NewTaskUpdate(task)
|
||||||
taskUpdate.PreviousStatus = &oldTaskStatus
|
taskUpdate.PreviousStatus = &oldTaskStatus
|
||||||
sm.broadcaster.BroadcastTaskUpdate(taskUpdate)
|
go sm.broadcaster.BroadcastTaskUpdate(taskUpdate)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ func (sm *StateMachine) JobStatusChange(
|
|||||||
// Broadcast this change to the SocketIO clients.
|
// Broadcast this change to the SocketIO clients.
|
||||||
jobUpdate := webupdates.NewJobUpdate(job)
|
jobUpdate := webupdates.NewJobUpdate(job)
|
||||||
jobUpdate.PreviousStatus = &oldJobStatus
|
jobUpdate.PreviousStatus = &oldJobStatus
|
||||||
sm.broadcaster.BroadcastJobUpdate(jobUpdate)
|
go sm.broadcaster.BroadcastJobUpdate(jobUpdate)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user