gearheads
/
mastodon
Archived
2
0
Fork 0

Disable retries on all scheduled tasks (#8413)

gh/stable
Eugen Rochko 2018-08-25 13:28:07 +02:00 committed by GitHub
parent 800325f452
commit 93537c5560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 9 deletions

View File

@ -3,7 +3,7 @@
class Scheduler::BackupCleanupScheduler class Scheduler::BackupCleanupScheduler
include Sidekiq::Worker include Sidekiq::Worker
sidekiq_options unique: :until_executed sidekiq_options unique: :until_executed, retry: 0
def perform def perform
old_backups.reorder(nil).find_each(&:destroy!) old_backups.reorder(nil).find_each(&:destroy!)

View File

@ -3,7 +3,7 @@
class Scheduler::DoorkeeperCleanupScheduler class Scheduler::DoorkeeperCleanupScheduler
include Sidekiq::Worker include Sidekiq::Worker
sidekiq_options unique: :until_executed sidekiq_options unique: :until_executed, retry: 0
def perform def perform
Doorkeeper::AccessToken.where('revoked_at IS NOT NULL').where('revoked_at < NOW()').delete_all Doorkeeper::AccessToken.where('revoked_at IS NOT NULL').where('revoked_at < NOW()').delete_all

View File

@ -3,7 +3,7 @@
class Scheduler::EmailScheduler class Scheduler::EmailScheduler
include Sidekiq::Worker include Sidekiq::Worker
sidekiq_options unique: :until_executed sidekiq_options unique: :until_executed, retry: 0
def perform def perform
eligible_users.reorder(nil).find_each do |user| eligible_users.reorder(nil).find_each do |user|

View File

@ -3,7 +3,7 @@
class Scheduler::FeedCleanupScheduler class Scheduler::FeedCleanupScheduler
include Sidekiq::Worker include Sidekiq::Worker
sidekiq_options unique: :until_executed sidekiq_options unique: :until_executed, retry: 0
def perform def perform
clean_home_feeds! clean_home_feeds!

View File

@ -5,7 +5,7 @@ class Scheduler::IpCleanupScheduler
RETENTION_PERIOD = 1.year RETENTION_PERIOD = 1.year
sidekiq_options unique: :until_executed sidekiq_options unique: :until_executed, retry: 0
def perform def perform
time_ago = RETENTION_PERIOD.ago time_ago = RETENTION_PERIOD.ago

View File

@ -3,7 +3,7 @@
class Scheduler::MediaCleanupScheduler class Scheduler::MediaCleanupScheduler
include Sidekiq::Worker include Sidekiq::Worker
sidekiq_options unique: :until_executed sidekiq_options unique: :until_executed, retry: 0
def perform def perform
unattached_media.find_each(&:destroy) unattached_media.find_each(&:destroy)

View File

@ -3,7 +3,7 @@
class Scheduler::SubscriptionsCleanupScheduler class Scheduler::SubscriptionsCleanupScheduler
include Sidekiq::Worker include Sidekiq::Worker
sidekiq_options unique: :until_executed sidekiq_options unique: :until_executed, retry: 0
def perform def perform
Subscription.expired.in_batches.delete_all Subscription.expired.in_batches.delete_all

View File

@ -3,7 +3,7 @@
class Scheduler::SubscriptionsScheduler class Scheduler::SubscriptionsScheduler
include Sidekiq::Worker include Sidekiq::Worker
sidekiq_options unique: :until_executed sidekiq_options unique: :until_executed, retry: 0
def perform def perform
Pubsubhubbub::SubscribeWorker.push_bulk(expiring_accounts.pluck(:id)) Pubsubhubbub::SubscribeWorker.push_bulk(expiring_accounts.pluck(:id))

View File

@ -3,7 +3,7 @@
class Scheduler::UserCleanupScheduler class Scheduler::UserCleanupScheduler
include Sidekiq::Worker include Sidekiq::Worker
sidekiq_options unique: :until_executed sidekiq_options unique: :until_executed, retry: 0
def perform def perform
User.where('confirmed_at is NULL AND confirmation_sent_at <= ?', 2.days.ago).reorder(nil).find_in_batches do |batch| User.where('confirmed_at is NULL AND confirmation_sent_at <= ?', 2.days.ago).reorder(nil).find_in_batches do |batch|