Expire jobs if context is canceled
This commit is contained in:
committed by
GitHub
parent
319caf8e91
commit
6ace4ab60d
@@ -391,6 +391,13 @@ func (a *Agent) processUserInputs(job *types.Job, role string, conv Messages) Me
|
||||
}
|
||||
|
||||
func (a *Agent) consumeJob(job *types.Job, role string) {
|
||||
|
||||
|
||||
if err := job.GetContext().Err(); err != nil {
|
||||
job.Result.Finish("expired"))
|
||||
return
|
||||
}
|
||||
|
||||
a.Lock()
|
||||
paused := a.pause
|
||||
a.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user