Skip to content

Commit 70149cf

Browse files
committed
Check if it finished before we acquired the lock
1 parent 5343bfd commit 70149cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/models/solid_queue/batch_record.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ def check_completion!
7474
end
7575

7676
with_lock do
77-
if pending_jobs <= 0
77+
if finished?
78+
# do nothing
79+
elsif pending_jobs <= 0
7880
if failed_jobs > 0
7981
mark_as_failed!
8082
else

0 commit comments

Comments
 (0)