Skip to content

Commit 265b06e

Browse files
committed
[IMP] queue_job: use state constant in lock function
1 parent b235205 commit 265b06e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

queue_job/job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@ def lock(self) -> bool:
261261
queue_job
262262
WHERE
263263
uuid = %s
264-
AND state='started'
264+
AND state = %s
265265
)
266266
FOR UPDATE SKIP LOCKED;
267267
""",
268-
[self.uuid],
268+
[self.uuid, STARTED],
269269
)
270270

271271
# 1 job should be locked

0 commit comments

Comments
 (0)