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 multi-tenant service where we do a lot of background processing. We need to expose some sort of status to the user about the background processing, but rather than "here is one monolithic job and its status", it is more like "there are still a couple hundred things running - come back later."
The issue we have is that we can either proliferate queues at a level that is unmanageable just so that we can have a queue per tenant and query each for how many entries they have, or we can have a huge amount of traffic to our DB to have persistent objects there for a ton of jobs.
Thus my question is: is there any way to get a count of enqueued jobs based on something besides queue or Job class, like a parameter in each one (tenant) or such? We go through ActiveJob right now, so bonus points if it is something where we don't have to move off that.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have a multi-tenant service where we do a lot of background processing. We need to expose some sort of status to the user about the background processing, but rather than "here is one monolithic job and its status", it is more like "there are still a couple hundred things running - come back later."
The issue we have is that we can either proliferate queues at a level that is unmanageable just so that we can have a queue per tenant and query each for how many entries they have, or we can have a huge amount of traffic to our DB to have persistent objects there for a ton of jobs.
Thus my question is: is there any way to get a count of enqueued jobs based on something besides queue or Job class, like a parameter in each one (tenant) or such? We go through ActiveJob right now, so bonus points if it is something where we don't have to move off that.
Beta Was this translation helpful? Give feedback.
All reactions