about summary refs log tree commit diff
path: root/app/workers/scheduler/subscriptions_cleanup_scheduler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/scheduler/subscriptions_cleanup_scheduler.rb')
-rw-r--r--app/workers/scheduler/subscriptions_cleanup_scheduler.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/workers/scheduler/subscriptions_cleanup_scheduler.rb b/app/workers/scheduler/subscriptions_cleanup_scheduler.rb
new file mode 100644
index 000000000..3b9211e81
--- /dev/null
+++ b/app/workers/scheduler/subscriptions_cleanup_scheduler.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+require 'sidekiq-scheduler'
+
+class Scheduler::SubscriptionsCleanupScheduler
+  include Sidekiq::Worker
+
+  def perform
+    Subscription.expired.in_batches.delete_all
+  end
+end