Skip to content

Commit 1aad9f9

Browse files
committed
Handle case of concurrency limit not being set in Semaphore
Avoid crashing in this case, just assume concurrency limit is 1. This shouldn't happen with normal operation but we've had this problem when jobs that are concurrency-limited are enqueued from new code and dispatched from old code, where the job still doesn't have concurrency controls.
1 parent 1d41b53 commit 1aad9f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/solid_queue/semaphore.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def expires_at
7070
end
7171

7272
def limit
73-
job.concurrency_limit
73+
job.concurrency_limit || 1
7474
end
7575
end
7676
end

0 commit comments

Comments
 (0)