about summary refs log tree commit diff
path: root/app/workers/activitypub/post_upgrade_worker.rb
blob: 4154b8582b08fffe946808aae6bb04773ba7dfb3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class ActivityPub::PostUpgradeWorker
  include Sidekiq::Worker

  sidekiq_options queue: 'pull'

  def perform(domain)
    Account.where(domain: domain)
           .where(protocol: :ostatus)
           .where.not(last_webfingered_at: nil)
           .in_batches
           .update_all(last_webfingered_at: nil)
  end
end