Skip to content

Commit

Permalink
Typo on default unique key
Browse files Browse the repository at this point in the history
  • Loading branch information
davegaeddert committed Jan 18, 2024
1 parent 84d3c9d commit c8a3a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bolt-jobs/bolt/jobs/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_unique_key(self) -> str:
A unique key to prevent duplicate jobs from being queued.
Enabled by returning a non-empty string.
"""
raise ""
return ""

def get_priority(self) -> int:
return 0
Expand Down
2 changes: 1 addition & 1 deletion bolt-jobs/bolt/jobs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def mark_lost_jobs(self):
# but if they're still running, we can't actually send a signal to cancel it...
now = timezone.now()
one_day_ago = now - datetime.timedelta(days=1)
lost_jobs = self.filter(created_at__lt=one_day_ago)
lost_jobs = self.filter(created_at__lt=one_day_ago) # Doesn't matter whether it started or not -- it shouldn't take this long.
for job in lost_jobs:
job.convert_to_result(
ended_at=now,
Expand Down

0 comments on commit c8a3a80

Please sign in to comment.