diff options
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/activitypub/processing_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/local_notification_worker.rb | 12 | ||||
-rw-r--r-- | app/workers/processing_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/scheduler/backup_cleanup_scheduler.rb | 1 | ||||
-rw-r--r-- | app/workers/scheduler/doorkeeper_cleanup_scheduler.rb | 1 | ||||
-rw-r--r-- | app/workers/scheduler/email_scheduler.rb | 1 | ||||
-rw-r--r-- | app/workers/scheduler/feed_cleanup_scheduler.rb | 1 | ||||
-rw-r--r-- | app/workers/scheduler/ip_cleanup_scheduler.rb | 1 | ||||
-rw-r--r-- | app/workers/scheduler/media_cleanup_scheduler.rb | 1 | ||||
-rw-r--r-- | app/workers/scheduler/subscriptions_cleanup_scheduler.rb | 2 | ||||
-rw-r--r-- | app/workers/scheduler/subscriptions_scheduler.rb | 3 | ||||
-rw-r--r-- | app/workers/scheduler/user_cleanup_scheduler.rb | 1 | ||||
-rw-r--r-- | app/workers/soft_block_domain_followers_worker.rb | 2 |
13 files changed, 14 insertions, 16 deletions
diff --git a/app/workers/activitypub/processing_worker.rb b/app/workers/activitypub/processing_worker.rb index 0e2e0eddd..bb9adf64b 100644 --- a/app/workers/activitypub/processing_worker.rb +++ b/app/workers/activitypub/processing_worker.rb @@ -6,6 +6,6 @@ class ActivityPub::ProcessingWorker sidekiq_options backtrace: true def perform(account_id, body) - ActivityPub::ProcessCollectionService.new.call(body, Account.find(account_id), override_timestamps: true) + ActivityPub::ProcessCollectionService.new.call(body, Account.find(account_id)) end end diff --git a/app/workers/local_notification_worker.rb b/app/workers/local_notification_worker.rb new file mode 100644 index 000000000..748270563 --- /dev/null +++ b/app/workers/local_notification_worker.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class LocalNotificationWorker + include Sidekiq::Worker + + def perform(mention_id) + mention = Mention.find(mention_id) + NotifyService.new.call(mention.account, mention) + rescue ActiveRecord::RecordNotFound + true + end +end diff --git a/app/workers/processing_worker.rb b/app/workers/processing_worker.rb index 978c3aba2..5df404bcc 100644 --- a/app/workers/processing_worker.rb +++ b/app/workers/processing_worker.rb @@ -6,6 +6,6 @@ class ProcessingWorker sidekiq_options backtrace: true def perform(account_id, body) - ProcessFeedService.new.call(body, Account.find(account_id), override_timestamps: true) + ProcessFeedService.new.call(body, Account.find(account_id)) end end diff --git a/app/workers/scheduler/backup_cleanup_scheduler.rb b/app/workers/scheduler/backup_cleanup_scheduler.rb index 7a9d4f894..5ab16c057 100644 --- a/app/workers/scheduler/backup_cleanup_scheduler.rb +++ b/app/workers/scheduler/backup_cleanup_scheduler.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'sidekiq-scheduler' class Scheduler::BackupCleanupScheduler include Sidekiq::Worker diff --git a/app/workers/scheduler/doorkeeper_cleanup_scheduler.rb b/app/workers/scheduler/doorkeeper_cleanup_scheduler.rb index 6488798cd..bab4ae886 100644 --- a/app/workers/scheduler/doorkeeper_cleanup_scheduler.rb +++ b/app/workers/scheduler/doorkeeper_cleanup_scheduler.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'sidekiq-scheduler' class Scheduler::DoorkeeperCleanupScheduler include Sidekiq::Worker diff --git a/app/workers/scheduler/email_scheduler.rb b/app/workers/scheduler/email_scheduler.rb index 24d0c0ebe..36866061b 100644 --- a/app/workers/scheduler/email_scheduler.rb +++ b/app/workers/scheduler/email_scheduler.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'sidekiq-scheduler' class Scheduler::EmailScheduler include Sidekiq::Worker diff --git a/app/workers/scheduler/feed_cleanup_scheduler.rb b/app/workers/scheduler/feed_cleanup_scheduler.rb index 23fa7672b..42cf14128 100644 --- a/app/workers/scheduler/feed_cleanup_scheduler.rb +++ b/app/workers/scheduler/feed_cleanup_scheduler.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'sidekiq-scheduler' class Scheduler::FeedCleanupScheduler include Sidekiq::Worker diff --git a/app/workers/scheduler/ip_cleanup_scheduler.rb b/app/workers/scheduler/ip_cleanup_scheduler.rb index a33ca031e..613a5e336 100644 --- a/app/workers/scheduler/ip_cleanup_scheduler.rb +++ b/app/workers/scheduler/ip_cleanup_scheduler.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'sidekiq-scheduler' class Scheduler::IpCleanupScheduler include Sidekiq::Worker diff --git a/app/workers/scheduler/media_cleanup_scheduler.rb b/app/workers/scheduler/media_cleanup_scheduler.rb index ce32ce314..c35686fcb 100644 --- a/app/workers/scheduler/media_cleanup_scheduler.rb +++ b/app/workers/scheduler/media_cleanup_scheduler.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'sidekiq-scheduler' class Scheduler::MediaCleanupScheduler include Sidekiq::Worker diff --git a/app/workers/scheduler/subscriptions_cleanup_scheduler.rb b/app/workers/scheduler/subscriptions_cleanup_scheduler.rb index 3b9211e81..af2ae3120 100644 --- a/app/workers/scheduler/subscriptions_cleanup_scheduler.rb +++ b/app/workers/scheduler/subscriptions_cleanup_scheduler.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'sidekiq-scheduler' - class Scheduler::SubscriptionsCleanupScheduler include Sidekiq::Worker diff --git a/app/workers/scheduler/subscriptions_scheduler.rb b/app/workers/scheduler/subscriptions_scheduler.rb index 469a3d2a6..dc16e85c2 100644 --- a/app/workers/scheduler/subscriptions_scheduler.rb +++ b/app/workers/scheduler/subscriptions_scheduler.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -require 'sidekiq-scheduler' -require 'sidekiq-bulk' - class Scheduler::SubscriptionsScheduler include Sidekiq::Worker diff --git a/app/workers/scheduler/user_cleanup_scheduler.rb b/app/workers/scheduler/user_cleanup_scheduler.rb index a8f8fbd83..245536cea 100644 --- a/app/workers/scheduler/user_cleanup_scheduler.rb +++ b/app/workers/scheduler/user_cleanup_scheduler.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'sidekiq-scheduler' class Scheduler::UserCleanupScheduler include Sidekiq::Worker diff --git a/app/workers/soft_block_domain_followers_worker.rb b/app/workers/soft_block_domain_followers_worker.rb index ce76683c5..85445c7fb 100644 --- a/app/workers/soft_block_domain_followers_worker.rb +++ b/app/workers/soft_block_domain_followers_worker.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'sidekiq-bulk' - class SoftBlockDomainFollowersWorker include Sidekiq::Worker |