This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Hangfire.Client; | |
| using Hangfire.Common; | |
| using Hangfire.States; | |
| using Hangfire.Storage; | |
| namespace ContentAdmin.Worker.Infrastructure.Hangfire.JobScheduler.JobResolver; | |
| // This is variation of https://gist.github.com/odinserj/a6ad7ba6686076c9b9b2e03fcf6bf74e | |
| // which handles all edge cases (see comments on the gist) | |
| public sealed class SkipWhenPreviousJobIsRunningAttribute : JobFilterAttribute, IClientFilter, IApplyStateFilter |