HangfireIO / HangfireIO/Hangfire
DI Scope of server filters
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
We are trying to retrofit a large application to support multi tenancy. Using a few posts here and from around the web I have created a JobFilter that pushes the current tenant ID into the job param list.
My hope was I could extract this from the job param list during the OnPerforming stage in the filter then push an object holding the value into my IoC container (autofac). It appears however the filter and the job do not live in the same scope.
Is there any way around this? Can I somehow push data from the job filter onto the job execution thread?
Thanks.
Contributor guide
Research direction
Start with the JobFilter and its OnPerforming stage, then trace how the filter and job obtain their Autofac scopes during job execution. Determine whether tenant data can be transferred onto the job execution thread and shared with the job. Done means there is a documented, supported answer or an agreed implementation path for sharing this context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100