Skip to content

Commit 655a7db

Browse files
committed
fix: removed the state condition, since it doesn't add any valued to query
1 parent f37a14c commit 655a7db

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

app/jobs/runtime/delayed_jobs_recover.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ def reenqueue(pollable_guid, delayed)
6060
# updated to the new delayed_job's guid, so where clause returns nil and we skip safely.
6161
PollableJobModel.db.transaction do
6262
pjob = PollableJobModel.where(guid: pollable_guid,
63-
delayed_job_guid: delayed.guid,
64-
state: [PollableJobModel::POLLING_STATE, PollableJobModel::FAILED_STATE]).
63+
delayed_job_guid: delayed.guid).
6564
for_update.first
6665
return unless pjob
6766

0 commit comments

Comments
 (0)