From 9481f811b72be0191aee8bfe205509ecc9bfc94a Mon Sep 17 00:00:00 2001 From: Tolga Ceylan Date: Wed, 6 Dec 2017 16:11:59 -0800 Subject: [PATCH] fn: fail count should include timeouts (#577) * fn: fail count should include timeouts --- api/agent/agent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) }