diff --git a/api/agent/agent.go b/api/agent/agent.go index e96e29c8d..f366a8a83 100644 --- a/api/agent/agent.go +++ b/api/agent/agent.go @@ -215,7 +215,7 @@ func (a *agent) Submit(callI Call) error { slot, err := a.getSlot(ctx, call) // find ram available / running if err != nil { - a.stats.Dequeue(callI.Model().AppName, callI.Model().Path) + a.stats.DequeueAndFail(callI.Model().AppName, callI.Model().Path) return transformTimeout(err, true) } // TODO if the call times out & container is created, we need @@ -225,7 +225,7 @@ func (a *agent) Submit(callI Call) error { // TODO Start is checking the timer now, we could do it here, too. err = call.Start(ctx) if err != nil { - a.stats.Dequeue(callI.Model().AppName, callI.Model().Path) + a.stats.DequeueAndFail(callI.Model().AppName, callI.Model().Path) return transformTimeout(err, true) }