fn: fail count should include timeouts (#577)

* fn: fail count should include timeouts
This commit is contained in:
Tolga Ceylan
2017-12-06 16:11:59 -08:00
committed by GitHub
parent fd309c7cac
commit 9481f811b7

View File

@@ -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)
}