Change some worker lock TTLs (#27246)
This commit is contained in:
parent
f1d3eda159
commit
8d73fbee87
11 changed files with 11 additions and 11 deletions
|
@ -3,7 +3,7 @@
|
||||||
class AccountDeletionWorker
|
class AccountDeletionWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
sidekiq_options queue: 'pull', lock: :until_executed
|
sidekiq_options queue: 'pull', lock: :until_executed, lock_ttl: 1.week.to_i
|
||||||
|
|
||||||
def perform(account_id, options = {})
|
def perform(account_id, options = {})
|
||||||
reserve_username = options.with_indifferent_access.fetch(:reserve_username, true)
|
reserve_username = options.with_indifferent_access.fetch(:reserve_username, true)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class ActivityPub::SynchronizeFeaturedCollectionWorker
|
class ActivityPub::SynchronizeFeaturedCollectionWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
sidekiq_options queue: 'pull', lock: :until_executed
|
sidekiq_options queue: 'pull', lock: :until_executed, lock_ttl: 1.day.to_i
|
||||||
|
|
||||||
def perform(account_id, options = {})
|
def perform(account_id, options = {})
|
||||||
options = { note: true, hashtag: false }.deep_merge(options.deep_symbolize_keys)
|
options = { note: true, hashtag: false }.deep_merge(options.deep_symbolize_keys)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class ActivityPub::SynchronizeFeaturedTagsCollectionWorker
|
class ActivityPub::SynchronizeFeaturedTagsCollectionWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
sidekiq_options queue: 'pull', lock: :until_executed
|
sidekiq_options queue: 'pull', lock: :until_executed, lock_ttl: 1.day.to_i
|
||||||
|
|
||||||
def perform(account_id, url)
|
def perform(account_id, url)
|
||||||
ActivityPub::FetchFeaturedTagsCollectionService.new.call(Account.find(account_id), url)
|
ActivityPub::FetchFeaturedTagsCollectionService.new.call(Account.find(account_id), url)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ActivityPub::UpdateDistributionWorker < ActivityPub::RawDistributionWorker
|
class ActivityPub::UpdateDistributionWorker < ActivityPub::RawDistributionWorker
|
||||||
sidekiq_options queue: 'push', lock: :until_executed
|
sidekiq_options queue: 'push', lock: :until_executed, lock_ttl: 1.day.to_i
|
||||||
|
|
||||||
# Distribute an profile update to servers that might have a copy
|
# Distribute an profile update to servers that might have a copy
|
||||||
# of the account in question
|
# of the account in question
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class Admin::AccountDeletionWorker
|
class Admin::AccountDeletionWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
sidekiq_options queue: 'pull', lock: :until_executed
|
sidekiq_options queue: 'pull', lock: :until_executed, lock_ttl: 1.week.to_i
|
||||||
|
|
||||||
def perform(account_id)
|
def perform(account_id)
|
||||||
DeleteAccountService.new.call(Account.find(account_id), reserve_username: true, reserve_email: true)
|
DeleteAccountService.new.call(Account.find(account_id), reserve_username: true, reserve_email: true)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class Admin::DomainPurgeWorker
|
class Admin::DomainPurgeWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
sidekiq_options queue: 'pull', lock: :until_executed
|
sidekiq_options queue: 'pull', lock: :until_executed, lock_ttl: 1.week.to_i
|
||||||
|
|
||||||
def perform(domain)
|
def perform(domain)
|
||||||
PurgeDomainService.new.call(domain)
|
PurgeDomainService.new.call(domain)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class PublishScheduledStatusWorker
|
class PublishScheduledStatusWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
sidekiq_options lock: :until_executed
|
sidekiq_options lock: :until_executed, lock_ttl: 1.hour.to_i
|
||||||
|
|
||||||
def perform(scheduled_status_id)
|
def perform(scheduled_status_id)
|
||||||
scheduled_status = ScheduledStatus.find(scheduled_status_id)
|
scheduled_status = ScheduledStatus.find(scheduled_status_id)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class ResolveAccountWorker
|
class ResolveAccountWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
sidekiq_options queue: 'pull', lock: :until_executed
|
sidekiq_options queue: 'pull', lock: :until_executed, lock_ttl: 1.day.to_i
|
||||||
|
|
||||||
def perform(uri)
|
def perform(uri)
|
||||||
ResolveAccountService.new.call(uri)
|
ResolveAccountService.new.call(uri)
|
||||||
|
|
|
@ -4,7 +4,7 @@ class Scheduler::IndexingScheduler
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
include Redisable
|
include Redisable
|
||||||
|
|
||||||
sidekiq_options retry: 0
|
sidekiq_options retry: 0, lock: :until_executed, lock_ttl: 30.minutes.to_i
|
||||||
|
|
||||||
IMPORT_BATCH_SIZE = 1000
|
IMPORT_BATCH_SIZE = 1000
|
||||||
SCAN_BATCH_SIZE = 10 * IMPORT_BATCH_SIZE
|
SCAN_BATCH_SIZE = 10 * IMPORT_BATCH_SIZE
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class Scheduler::ScheduledStatusesScheduler
|
class Scheduler::ScheduledStatusesScheduler
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
sidekiq_options retry: 0
|
sidekiq_options retry: 0, lock: :until_executed, lock_ttl: 1.hour.to_i
|
||||||
|
|
||||||
def perform
|
def perform
|
||||||
publish_scheduled_statuses!
|
publish_scheduled_statuses!
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class VerifyAccountLinksWorker
|
class VerifyAccountLinksWorker
|
||||||
include Sidekiq::Worker
|
include Sidekiq::Worker
|
||||||
|
|
||||||
sidekiq_options queue: 'default', retry: false, lock: :until_executed
|
sidekiq_options queue: 'default', retry: false, lock: :until_executed, lock_ttl: 1.hour.to_i
|
||||||
|
|
||||||
def perform(account_id)
|
def perform(account_id)
|
||||||
account = Account.find(account_id)
|
account = Account.find(account_id)
|
||||||
|
|
Loading…
Reference in a new issue