You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a setup where we run a lot of sidekiq jobs using the middleware from this gem. They are all tenant-scoped, but a lot of them never actually need the tenant object itself, just the ID (to attach as a where clause to other queries).
We have found that our database is doing a fair bit of extra work loading the tenant object in all of these jobs (not because the query is expensive, but because of the volume of jobs we run), which is ultimately unused. We were hoping there was a way to make the sidekiq middleware load the tenant object lazily? Or the ability to flag jobs as not needing the full object, and just using the ID from the job args (in the way that MultiTenant.with(id) is already supported) or something?
The text was updated successfully, but these errors were encountered:
First, thanks for such a useful gem!
We have a setup where we run a lot of sidekiq jobs using the middleware from this gem. They are all tenant-scoped, but a lot of them never actually need the tenant object itself, just the ID (to attach as a
where
clause to other queries).We have found that our database is doing a fair bit of extra work loading the tenant object in all of these jobs (not because the query is expensive, but because of the volume of jobs we run), which is ultimately unused. We were hoping there was a way to make the sidekiq middleware load the tenant object lazily? Or the ability to flag jobs as not needing the full object, and just using the ID from the job args (in the way that
MultiTenant.with(id)
is already supported) or something?The text was updated successfully, but these errors were encountered: