mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
parent
84ea45ebaa
commit
05bdfcd550
16 changed files with 70 additions and 4 deletions
|
@ -60,6 +60,23 @@ namespace PlexRequests.Services.Jobs
|
|||
}
|
||||
}
|
||||
|
||||
public void SetRunning(bool running, string jobName)
|
||||
{
|
||||
var allJobs = Repo.GetAll();
|
||||
var storeJob = allJobs.FirstOrDefault(x => x.Name == jobName);
|
||||
if (storeJob != null)
|
||||
{
|
||||
storeJob.Running = running;
|
||||
Repo.Update(storeJob);
|
||||
}
|
||||
else
|
||||
{
|
||||
var job = new ScheduledJobs { Running = running, Name = jobName };
|
||||
Repo.Insert(job);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async Task<IEnumerable<ScheduledJobs>> GetJobsAsync()
|
||||
{
|
||||
return await Repo.GetAllAsync();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue