闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
287 B

  1. # frozen_string_literal: true
  2. class Scheduler::SubscriptionsScheduler
  3. include Sidekiq::Worker
  4. def perform
  5. Pubsubhubbub::SubscribeWorker.push_bulk(expiring_accounts.pluck(:id))
  6. end
  7. private
  8. def expiring_accounts
  9. Account.expiring(1.day.from_now).partitioned
  10. end
  11. end