- Added a visual indication on the UI to tell the admin there is a update available.

- We are now also recording the last scheduled run in the database
This commit is contained in:
tidusjar 2016-04-29 14:08:30 +01:00
commit df3dc4ac04
28 changed files with 392 additions and 45 deletions

View file

@ -41,11 +41,12 @@ namespace PlexRequests.Services.Jobs
{
public class SickRageCacher : IJob, ISickRageCacher
{
public SickRageCacher(ISettingsService<SickRageSettings> srSettings, ISickRageApi srApi, ICacheProvider cache)
public SickRageCacher(ISettingsService<SickRageSettings> srSettings, ISickRageApi srApi, ICacheProvider cache, IJobRecord rec)
{
SrSettings = srSettings;
SrApi = srApi;
Cache = cache;
Job = rec;
}
private ISettingsService<SickRageSettings> SrSettings { get; }
@ -53,6 +54,7 @@ namespace PlexRequests.Services.Jobs
private ISickRageApi SrApi { get; }
private static Logger Log = LogManager.GetCurrentClassLogger();
private IJobRecord Job { get; }
public void Queued()
{
@ -74,6 +76,10 @@ namespace PlexRequests.Services.Jobs
{
Log.Error(ex, "Failed caching queued items from SickRage");
}
finally
{
Job.Record(JobNames.SrCacher);
}
}
}