简体   繁体   中英

How to run background workers simultaneously for multi tenancy in ABP framework

I'm using ABP framework (version 5.3.3) for my project. I have 2 tenants with separate databases on different servers. My project has a task needs to run every 5 minutes to call a stored procedure in database of each tenant but I don't know how to run that task with background worker simultaneously for those tenants? I know that Hangfire can process multiple queues but how to configure to achieve my purpose?

Hope that my question is clear and appreciate for your helps.

Your scheduled task should be:

  • loop over your list of tenants
  • foreach tenant, enqueue a background task which will run your stored procedure for this tenant

As far as I know (I don't know ABP), you don't need anything else to achieve your goal

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM