Save 36% for Black Friday! Learn more

New Discussion

Notifications

You’re not receiving notifications from this thread.

I am wondering if there is a way to access the current_tenant ID within a sidekiq job?

1
Rails

I can see that everything is scoped to the tenant via ActsAsTenant.with_tenant
https://github.com/ErwinM/acts_as_tenant/blob/master/lib/acts_as_tenant/sidekiq.rb

but wondering if I wanted to access the ID or the tenant object, how could I do this?

seems so obvious now 😀
ActsAsTenant.current_tenant.id
that will get the current account ID

Join the discussion
Create an account Log in