I’m currently using Ash framework’s multitenancy in our application, and it has been working great for managing tenant-specific data. We’re also using Oban to handle background jobs, and I have a specific use case where I’m not sure how to best handle job processing across different tenants.
The current setup ensures that jobs within a single tenant are processed in sequence, which is working as intended (similar to having a queue size of 1 per tenant). However, I would like to achieve parallel job processing between different tenants, ensuring that one tenant’s jobs do not affect the performance of jobs from another tenant. The tenant is currently stored as an argument in the Oban job.
Is there a way to configure Oban to process jobs concurrently between different tenants, while still maintaining the sequential order within each tenant?
Any guidance or best practices on how to achieve this would be much appreciated!
Thanks in advance!