Skip to content

Commit 1961978

Browse files
committed
Don't instantiate job class to check concurrency limit if the key is not set
1 parent 87f7861 commit 1961978

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/solid_queue/job/concurrency_controls.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def release_next_blocked_job
3737
end
3838

3939
def concurrency_limited?
40-
concurrency_limit.to_i > 0 && concurrency_key.present?
40+
concurrency_key.present? && concurrency_limit.to_i > 0
4141
end
4242

4343
def job_class

0 commit comments

Comments
 (0)