mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: blocking mode should not emit 503 if can't evict (#1283)
This commit is contained in:
@@ -494,7 +494,8 @@ func (a *agent) checkLaunch(ctx context.Context, call *call, notifyChan chan err
|
||||
} else {
|
||||
needMem, needCpu := tok.NeededCapacity()
|
||||
notifyChans = a.evictor.PerformEviction(call.slotHashId, needMem, uint64(needCpu))
|
||||
if len(notifyChans) == 0 {
|
||||
// For Non-blocking mode, if there's nothing to evict, we emit 503.
|
||||
if len(notifyChans) == 0 && isNB {
|
||||
tryNotify(notifyChan, tok.Error())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user