Class: TenantLevelSecurity::Sidekiq::Middleware::Client
- Inherits:
-
Object
- Object
- TenantLevelSecurity::Sidekiq::Middleware::Client
- Defined in:
- lib/activerecord-tenant-level-security/sidekiq.rb
Instance Method Summary collapse
Instance Method Details
#call(worker_class, job, queue, redis_pool) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/activerecord-tenant-level-security/sidekiq.rb', line 5 def call(worker_class, job, queue, redis_pool) tenant_id = TenantLevelSecurity.current_session_tenant_id if tenant_id.present? job['tenant_level_security'] ||= { id: tenant_id } end yield end |