2018-11-08 19:23:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
require 'active_job/arguments'
|
|
|
|
|
|
|
|
module MailScheduler
|
|
|
|
class NotificationServiceWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
include MailSchedulerQueue
|
|
|
|
|
|
|
|
def perform(meth, *args)
|
|
|
|
deserialized_args = ActiveJob::Arguments.deserialize(args)
|
|
|
|
|
|
|
|
notification_service.public_send(meth, *deserialized_args) # rubocop:disable GitlabSecurity/PublicSend
|
|
|
|
rescue ActiveJob::DeserializationError
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.perform_async(*args)
|
|
|
|
super(*ActiveJob::Arguments.serialize(args))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|