mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
done #318
This commit is contained in:
parent
e8706354b9
commit
3e16d8acf0
18 changed files with 399 additions and 57 deletions
|
@ -25,13 +25,15 @@
|
|||
// ************************************************************************/
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using PlexRequests.Services.Interfaces;
|
||||
using PlexRequests.Store.Models;
|
||||
using PlexRequests.Store.Repository;
|
||||
|
||||
namespace PlexRequests.Services
|
||||
namespace PlexRequests.Services.Jobs
|
||||
{
|
||||
public class JobRecord : IJobRecord
|
||||
{
|
||||
|
@ -39,7 +41,9 @@ namespace PlexRequests.Services
|
|||
{
|
||||
Repo = repo;
|
||||
}
|
||||
|
||||
private IRepository<ScheduledJobs> Repo { get; }
|
||||
|
||||
public void Record(string jobName)
|
||||
{
|
||||
var allJobs = Repo.GetAll();
|
||||
|
@ -55,5 +59,15 @@ namespace PlexRequests.Services
|
|||
Repo.Insert(job);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<ScheduledJobs>> GetJobsAsync()
|
||||
{
|
||||
return await Repo.GetAllAsync();
|
||||
}
|
||||
|
||||
public IEnumerable<ScheduledJobs> GetJobs()
|
||||
{
|
||||
return Repo.GetAll();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue