Class: MailScheduler::NotificationServiceWorker
- Inherits:
-
Object
- Object
- MailScheduler::NotificationServiceWorker
- Includes:
- ApplicationWorker, MailSchedulerQueue
- Defined in:
- app/workers/mail_scheduler/notification_service_worker.rb
Overview
rubocop:disable Scalability/IdempotentWorker
Constant Summary
Constants included from ApplicationWorker
ApplicationWorker::LOGGING_EXTRA_KEY
Constants included from WorkerAttributes
WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES
Class Method Summary collapse
Instance Method Summary collapse
Methods included from MailSchedulerQueue
Methods included from Gitlab::SidekiqVersioning::Worker
Methods included from WorkerContext
Class Method Details
.perform_async(*args) ⇒ Object
29 30 31 |
# File 'app/workers/mail_scheduler/notification_service_worker.rb', line 29 def self.perform_async(*args) super(*ActiveJob::Arguments.serialize(args)) end |
Instance Method Details
#perform(meth, *args) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/workers/mail_scheduler/notification_service_worker.rb', line 14 def perform(meth, *args) check_arguments!(args) deserialized_args = ActiveJob::Arguments.deserialize(args) notification_service.public_send(meth, *deserialized_args) # rubocop:disable GitlabSecurity/PublicSend rescue ActiveJob::DeserializationError # No-op. # This exception gets raised when an argument # is correct (deserializeable), but it still cannot be deserialized. # This can happen when an object has been deleted after # rails passes this job to sidekiq, but before # sidekiq gets it for execution. # In this case just do nothing. end |