mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 19:40:05 -07:00
Fixed duplicate notifications #3398
This commit is contained in:
parent
0e7cbe5c6b
commit
72403f21f6
4 changed files with 41 additions and 10 deletions
|
@ -1,4 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Quartz;
|
||||
using Quartz.Impl;
|
||||
|
@ -36,6 +38,12 @@ namespace Ombi.Helpers
|
|||
return Scheduler;
|
||||
}
|
||||
|
||||
public static async Task<bool> IsJobRunnung(string jobName)
|
||||
{
|
||||
var running = await Scheduler.GetCurrentlyExecutingJobs();
|
||||
return running.Any(x => x.JobDetail.Key.Name.Equals(jobName, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
|
||||
public async Task AddJob<T>(string name, string group, string cronExpression, Dictionary<string, string> jobData = null)
|
||||
where T : IJob
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue