Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
fix: allow "unlimited" value (zero)
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Mar 28, 2022
1 parent d8c71c0 commit 045027d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ai/backend/manager/scheduler/predicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
local result = {}
redis.call('SETNX', key, 0)
local count = tonumber(redis.call('GET', key))
if count >= limit then
if limit > 0 and count >= limit then
result[1] = 0
result[2] = count
return result
Expand Down

0 comments on commit 045027d

Please # to comment.