Skip to content

Commit

Permalink
can't use select_for_update after removing the transaction block
Browse files Browse the repository at this point in the history
  • Loading branch information
d-flood committed Dec 7, 2024
1 parent 1506a4c commit 4598507
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/peasy_jobs/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.2"
__version__ = "0.3.3"
2 changes: 1 addition & 1 deletion src/peasy_jobs/peasy_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def run(self, *, exit_when_queue_empty: bool):
self.running = False
break

jobs = PeasyJobQueue.objects.select_for_update().filter(status=PeasyJobQueue.ENQUEUED)
jobs = PeasyJobQueue.objects.filter(status=PeasyJobQueue.ENQUEUED)
job_ids = list(jobs.values_list("pk", flat=True)[: self.concurrency])
if job_ids:
PeasyJobQueue.objects.filter(pk__in=job_ids).update(
Expand Down

0 comments on commit 4598507

Please sign in to comment.