- ABP Framework version: v4.3.3
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
Hi, I want to use the background service with hangfire and multi tenant. Do you have any example for this? Or any type of documentation for this type of example?
14 Answer(s)
- 
    0hi @BernardoTeixeira Can you explain your use case? 
- 
    0See: https://support.abp.io/QA/Questions/1628/AsyncBackgroundJobs#answer-9bd678d0-8939-94ff-3d01-39fdfeea6986 
- 
    0hi @BernardoTeixeira Can you explain your use case? I want to know the best approach to use Hangfire with multi tenant. Because I want to isolate all the backgrounds services, a solution just for background services. 
- 
    0There is currently no such best practice, depending on your use case. 
- 
    0
- 
    0hi Can you share a simple project with me? liming.ma@volosoft.com 
- 
    0I sent you an invitation for github 
- 
    0hi BernardoTeixeira Please share the steps? btw, Why are you using module templates? 
- 
    0hi BernardoTeixeira Please share the steps? btw, Why are you using module templates? My steps was https://docs.abp.io/en/abp/latest/Background-Jobs and also this -> https://docs.abp.io/en/abp/latest/Background-Jobs-Hangfire, I just want register background services and make recurring job. Because I want to isolate the Background services. 
- 
    0If I understand correctly, the Identity server have the tenants and also the connections strings. I can expose the data for the tenant's Id(using an endpoint) and then use CurrentTenant.Changeso I can have the connections string for that tenant.But in that case, my Background Module will connect directly to the database. I don't want that. Instead, I want to connect my background service to an API. Is this approach supportable with CurrentTenant.Changeor the ABP has another approach?
- 
    0hi It works for me. I want to connect my background service to an API. Is this approach supportable with CurrentTenant.Change or the ABP has another approach? Your API may require permissions, and authentication in a background job is not recommended. This is complicated. You can consider calling the domain service directly in the job, so that CurrentTenant.Changewill work.
- 
    0It doenst work for me... Did you change anything? 
- 
    0I didn't change anything. : ) 
- 
    0This question has been automatically marked as stale because it has not had recent activity. 




 
                                