Skip to content

Commit

Permalink
fix: Ensure subscription activation clock job cannot be enqueued twice (
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet authored Feb 2, 2024
1 parent 4f7fef5 commit 4c2e135
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/jobs/clock/activate_subscriptions_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module Clock
class ActivateSubscriptionsJob < ApplicationJob
queue_as 'clock'

unique :until_executed, on_conflict: :log

def perform
Subscriptions::ActivateService.new(timestamp: Time.current.to_i).activate_all_pending
end
Expand Down

0 comments on commit 4c2e135

Please sign in to comment.