Skip to content

Commit 86c8330

Browse files
committed
Save a query to ready_executions when deleting a job that's not concurrency-limited
No need to try to unblock the next execution in that case.
1 parent 5abcde8 commit 86c8330

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/solid_queue/job/concurrency_controls.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module ConcurrencyControls
1010

1111
delegate :concurrency_limit, :concurrency_duration, to: :job_class
1212

13-
before_destroy :unblock_next_blocked_job, if: :ready?
13+
before_destroy :unblock_next_blocked_job, if: -> { concurrency_limited? && ready? }
1414
end
1515

1616
def unblock_next_blocked_job

0 commit comments

Comments
 (0)