Class: Sidekiq::EncryptedArgs::ClientMiddleware
- Inherits:
-
Object
- Object
- Sidekiq::EncryptedArgs::ClientMiddleware
- Includes:
- ClientMiddleware
- Defined in:
- lib/sidekiq/encrypted_args/client_middleware.rb
Overview
Sidekiq client middleware for encrypting arguments on jobs for workers
with encrypted_args set in the sidekiq_options.
This middleware is responsible for encrypting job arguments before they are sent to Redis. It runs on the client side when jobs are enqueued.
Instance Method Summary collapse
-
#call(worker_class, job, queue, redis_pool = nil) { ... } ⇒ void
Encrypt specified arguments before they're sent off to the queue.
Instance Method Details
#call(worker_class, job, queue, redis_pool = nil) { ... } ⇒ void
This method returns an undefined value.
Encrypt specified arguments before they're sent off to the queue.
23 24 25 26 27 28 29 30 |
# File 'lib/sidekiq/encrypted_args/client_middleware.rb', line 23 def call(worker_class, job, queue, redis_pool = nil) if job.include?("encrypted_args") encrypted_args = EncryptedArgs.encrypted_args_option(worker_class, job) encrypt_job_arguments!(job, encrypted_args) end yield end |