- 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

@ -35,6 +35,8 @@ using PlexRequests.Core;
using PlexRequests.Core.SettingModels;
using PlexRequests.Helpers;
using PlexRequests.Services.Interfaces;
using PlexRequests.Store.Models;
using PlexRequests.Store.Repository;
using Quartz;
@ -42,16 +44,18 @@ namespace PlexRequests.Services.Jobs
{
public class SonarrCacher : IJob, ISonarrCacher
{
public SonarrCacher(ISettingsService<SonarrSettings> sonarrSettings, ISonarrApi sonarrApi, ICacheProvider cache)
public SonarrCacher(ISettingsService<SonarrSettings> sonarrSettings, ISonarrApi sonarrApi, ICacheProvider cache, IJobRecord rec)
{
SonarrSettings = sonarrSettings;
SonarrApi = sonarrApi;
Job = rec;
Cache = cache;
}
private ISettingsService<SonarrSettings> SonarrSettings { get; }
private ICacheProvider Cache { get; }
private ISonarrApi SonarrApi { get; }
private IJobRecord Job { get; }
private static Logger Log = LogManager.GetCurrentClassLogger();
@ -75,6 +79,10 @@ namespace PlexRequests.Services.Jobs
{
Log.Error(ex, "Failed caching queued items from Sonarr");
}
finally
{
Job.Record(JobNames.SonarrCacher);
}
}
}