Merge branch 'main' into glitch-soc/merge-upstream
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::AccountRawDistributionWorker < ActivityPub::RawDistributionWorker
|
||||
protected
|
||||
|
||||
def inboxes
|
||||
@inboxes ||= AccountReachFinder.new(@account).inboxes
|
||||
end
|
||||
end
|
@@ -5,8 +5,10 @@ class ActivityPub::SynchronizeFeaturedCollectionWorker
|
||||
|
||||
sidekiq_options queue: 'pull', lock: :until_executed
|
||||
|
||||
def perform(account_id)
|
||||
ActivityPub::FetchFeaturedCollectionService.new.call(Account.find(account_id))
|
||||
def perform(account_id, options = {})
|
||||
options = { note: true, hashtag: false }.deep_merge(options.deep_symbolize_keys)
|
||||
|
||||
ActivityPub::FetchFeaturedCollectionService.new.call(Account.find(account_id), **options)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
|
@@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::SynchronizeFeaturedTagsCollectionWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
sidekiq_options queue: 'pull', lock: :until_executed
|
||||
|
||||
def perform(account_id, url)
|
||||
ActivityPub::FetchFeaturedTagsCollectionService.new.call(Account.find(account_id), url)
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
end
|
@@ -1,6 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::UpdateDistributionWorker < ActivityPub::RawDistributionWorker
|
||||
sidekiq_options queue: 'push', lock: :until_executed
|
||||
|
||||
# Distribute an profile update to servers that might have a copy
|
||||
# of the account in question
|
||||
def perform(account_id, options = {})
|
||||
|
11
app/workers/remove_featured_tag_worker.rb
Normal file
11
app/workers/remove_featured_tag_worker.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class RemoveFeaturedTagWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(account_id, featured_tag_id)
|
||||
RemoveFeaturedTagService.new.call(Account.find(account_id), FeaturedTag.find(featured_tag_id))
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
end
|
@@ -3,7 +3,7 @@
|
||||
class Scheduler::VacuumScheduler
|
||||
include Sidekiq::Worker
|
||||
|
||||
sidekiq_options retry: 0
|
||||
sidekiq_options retry: 0, lock: :until_executed
|
||||
|
||||
def perform
|
||||
vacuum_operations.each do |operation|
|
||||
|
Reference in New Issue
Block a user