HangfireIO / HangfireIO/Hangfire
Setting context to DeletedState doesn't invoke OnStateElection
Open
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
If a job's state context is explicitly set to DeletedState, then it's deleted but the OnStateElection filter event is not invoked with the new state.
``` csharp
public void OnStateElection(ElectStateContext context)
{
if (some_condition)
{
// this should invoke this filter event with the new state, but it doesn't
context.CandidateState = new DeletedState();
}
}
```
Is this by design or a bug?
Contributor guide
Assessment
This issue has not been assessed yet.