about summary refs log tree commit diff
path: root/app/workers/scheduler/subscriptions_cleanup_scheduler.rb
blob: 06ba662051cccd2ea04409ef6fad49b3f28f9218 (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

  def perform
    Subscription.expired.in_batches.delete_all
  end
end