diff options
author | syasonik <syasonik@gitlab.com> | 2019-04-04 18:06:34 +0800 |
---|---|---|
committer | syasonik <syasonik@gitlab.com> | 2019-04-04 18:14:29 +0800 |
commit | 28160a77b29b37d78044f951382d8d9edbce7313 (patch) | |
tree | 26ebaf9f171dc5c1fc4a44a01f2f449ff3d478cc | |
parent | 32cbe04b4b130d4ffb223c3a1504f29fd489c93f (diff) | |
download | gitlab-ce-serialize-sidekiq-args.tar.gz |
Serialize all sidekiq worker argsserialize-sidekiq-args
-rw-r--r-- | app/workers/concerns/application_worker.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/workers/concerns/application_worker.rb b/app/workers/concerns/application_worker.rb index d64c2f82a09..15ccf5d0d6a 100644 --- a/app/workers/concerns/application_worker.rb +++ b/app/workers/concerns/application_worker.rb @@ -11,6 +11,18 @@ module ApplicationWorker set_queue end + def perform(*args) + super *Serializers::Sidekiq.parse(*args) + end + + def perform_in(time, *args) + super(time, *Serializers::Sidekiq.serialize(*args)) + end + + def perform_async(*args) + super *Serializers::Sidekiq.serialize(*args) + end + class_methods do def inherited(subclass) subclass.set_queue |