Skip to content

Commit 191a6ea

Browse files
committed
Retry scheduled jobs a maximum of three times
1 parent c0dd784 commit 191a6ea

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

app/jobs/daily_puzzle_job.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class DailyPuzzleJob < ApplicationJob
22
queue_as :default
3+
retry_on StandardError, attempts: 3
34

45
def perform
56
puzzle = Puzzle.where(sent_at: nil).order("RANDOM()").first

app/jobs/weekly_leaderboard_job.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class WeeklyLeaderboardJob < ApplicationJob
22
queue_as :default
3+
retry_on StandardError, attempts: 3
34

45
def perform
56
start_time = Time.now.utc.beginning_of_week.beginning_of_day # Monday at 00:00 UTC

0 commit comments

Comments
 (0)