about summary refs log tree commit diff
path: root/app/workers/scheduler/subscriptions_cleanup_scheduler.rb
blob: 5fba120f6ab339ccfede1b8b232a762b84f9f815 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

class Scheduler::SubscriptionsCleanupScheduler
  include Sidekiq::Worker

  sidekiq_options unique: :until_executed, retry: 0

  def perform
    Subscription.expired.in_batches.delete_all
  end
end