eventhandler: container sent state bug fix
Fixed a bug where upon submitting the task state change,
the container sent state was not being updated. This
would cause spurious container state changes in the
submission queue of task handler upon agent restart.
@@ -275,6 +275,9 @@ func setTaskChangeSent(event *sendableEvent) {
if event.taskChange.Task != nil {
event.taskChange.Task.SetSentStatus(event.taskChange.Status)
}
+ for _, container := range event.taskChange.Containers {
+ container.Container.SetSentStatus(event.taskChange.Status.ContainerStatus(container.Container.GetSteadyStateStatus()))
+ }
}
// setTaskAttachmentSent sets the event's task attachment object as sent
