Base solution for your next web application
Open Closed

Guidance on Hangfire and multi-tenancy #8069


User avatar
0
dev1_premierpoint created

The application we are developing is a multi-tenant application using the Single Deployment - Single Database model for multi-tenancy.

One of the features of the application for a tenant is the ability to create and schedule background jobs that handle data processing functions they need to do. So, we have to provide an interface that will give them CRUD capabilities for all of their background jobs.

What would be the recommended approach to using Hangfire in this type of multi-tenant application? All of the Abp dbs are "tenant-aware", but the Hangfire dbs are not, as best as I can tell.

Can you give me some guidance on the approach you would take to developing this capability in an Abp-based application?


2 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, BackgroundJobInfo is a Host side only entity and it does not contain any tenancy information. You can extend the entity to add tenant information for Job CRUD management.

    For job execution, you can include tenant information as part the job arguments.

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.