Skip to content

Commit c8a3a80

Browse files
committed
Typo on default unique key
1 parent 84d3c9d commit c8a3a80

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: bolt-jobs/bolt/jobs/jobs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def get_unique_key(self) -> str:
161161
A unique key to prevent duplicate jobs from being queued.
162162
Enabled by returning a non-empty string.
163163
"""
164-
raise ""
164+
return ""
165165

166166
def get_priority(self) -> int:
167167
return 0

Diff for: bolt-jobs/bolt/jobs/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def mark_lost_jobs(self):
9090
# but if they're still running, we can't actually send a signal to cancel it...
9191
now = timezone.now()
9292
one_day_ago = now - datetime.timedelta(days=1)
93-
lost_jobs = self.filter(created_at__lt=one_day_ago)
93+
lost_jobs = self.filter(created_at__lt=one_day_ago) # Doesn't matter whether it started or not -- it shouldn't take this long.
9494
for job in lost_jobs:
9595
job.convert_to_result(
9696
ended_at=now,

0 commit comments

Comments
 (0)