Commit 2d77c32c authored by Ivan Aguilar's avatar Ivan Aguilar Committed by Faho Shubladze
Browse files

Reset status of reboot documents to in progress after starting worker

cr: https://code.amazon.com/reviews/CR-54144129
parent 39709589
......@@ -172,6 +172,10 @@ func (e *OutOfProcExecuter) initialize(stopTimer chan bool) (ipc filewatcherbase
if channelErr := filewatcherbasedipc.RemoveFileWatcherChannel(e.ctx.Identity(), documentID); channelErr != nil {
log.Warnf("failed to remove channel directory: %v", channelErr)
}
// change document status to in progress now instead of waiting for worker to avoid
// the chance agent is restarted before worker updates, leaving status as SuccessAndReboot,
// and resulting in agent deleting an in use file channel when it comes back up
e.docState.DocumentInformation.DocumentStatus = contracts.ResultStatusInProgress
}
ipc, err, found = channelCreator(log, e.ctx.Identity(), filewatcherbasedipc.ModeMaster, documentID)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment