Run discards on the state-driven coordinator
This commit is contained in:
@@ -110,12 +110,7 @@ func (m *Manager) handoff(ctx context.Context, sessionID, handoff string) error
|
||||
next.State = api.AgentSessionStateRunning
|
||||
err = m.store.ReplaceSession(ctx, sess.Id, next, task.ProjectId, "byre")
|
||||
if errors.Is(err, store.ErrStateChanged) {
|
||||
err = transition(ctx, m.store, sess.Id, api.AgentSessionStateRunning, api.AgentSessionStateIdle, "byre")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.startDiscard(task.Id)
|
||||
return nil
|
||||
return transition(ctx, m.store, sess.Id, api.AgentSessionStateRunning, api.AgentSessionStateIdle, "byre")
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user