more renames

pull/1741/head
Jamie 7 years ago
parent 191c46d7aa
commit e090800cd7

@ -151,13 +151,13 @@ namespace Ombi.DependencyInjection
services.AddTransient<IPlexEpisodeSync, PlexEpisodeSync>();
services.AddTransient<IPlexAvailabilityChecker, PlexAvailabilityChecker>();
services.AddTransient<IJobSetup, JobSetup>();
services.AddTransient<IRadarrCacher, RadarrCacher>();
services.AddTransient<ISonarrCacher, SonarrCacher>();
services.AddTransient<IRadarrSync, RadarrSync>();
services.AddTransient<ISonarrSync, SonarrSync>();
services.AddTransient<IOmbiAutomaticUpdater, OmbiAutomaticUpdater>();
services.AddTransient<IPlexUserImporter, PlexUserImporter>();
services.AddTransient<IEmbyUserImporter, EmbyUserImporter>();
services.AddTransient<IWelcomeEmail, WelcomeEmail>();
services.AddTransient<ICouchPotatoCacher, CouchPotatoCacher>();
services.AddTransient<ICouchPotatoSync, CouchPotatoSync>();
services.AddTransient<IProcessProvider, ProcessProvider>();
}
}

@ -11,34 +11,34 @@ namespace Ombi.Schedule
{
public class JobSetup : IJobSetup
{
public JobSetup(IPlexContentSync plexContentSync, IRadarrCacher radarrCacher,
public JobSetup(IPlexContentSync plexContentSync, IRadarrSync radarrSync,
IOmbiAutomaticUpdater updater, IEmbyContentSync embySync, IPlexUserImporter userImporter,
IEmbyUserImporter embyUserImporter, ISonarrCacher cache, ICouchPotatoCacher cpCache)
IEmbyUserImporter embyUserImporter, ISonarrSync cache, ICouchPotatoSync cpCache)
{
PlexContentSync = plexContentSync;
RadarrCacher = radarrCacher;
RadarrSync = radarrSync;
Updater = updater;
EmbyContentSync = embySync;
PlexUserImporter = userImporter;
EmbyUserImporter = embyUserImporter;
SonarrCacher = cache;
SonarrSync = cache;
CpCache = cpCache;
}
private IPlexContentSync PlexContentSync { get; }
private IRadarrCacher RadarrCacher { get; }
private IRadarrSync RadarrSync { get; }
private IOmbiAutomaticUpdater Updater { get; }
private IPlexUserImporter PlexUserImporter { get; }
private IEmbyContentSync EmbyContentSync { get; }
private IEmbyUserImporter EmbyUserImporter { get; }
private ISonarrCacher SonarrCacher { get; }
private ICouchPotatoCacher CpCache { get; }
private ISonarrSync SonarrSync { get; }
private ICouchPotatoSync CpCache { get; }
public void Setup()
{
RecurringJob.AddOrUpdate(() => EmbyContentSync.Start(), Cron.Hourly(5));
RecurringJob.AddOrUpdate(() => SonarrCacher.Start(), Cron.Hourly(10));
RecurringJob.AddOrUpdate(() => RadarrCacher.CacheContent(), Cron.Hourly(15));
RecurringJob.AddOrUpdate(() => SonarrSync.Start(), Cron.Hourly(10));
RecurringJob.AddOrUpdate(() => RadarrSync.CacheContent(), Cron.Hourly(15));
RecurringJob.AddOrUpdate(() => PlexContentSync.CacheContent(), Cron.Hourly(20));
RecurringJob.AddOrUpdate(() => CpCache.Start(), Cron.Hourly(30));

@ -39,10 +39,10 @@ using Ombi.Store.Entities;
namespace Ombi.Schedule.Jobs.Couchpotato
{
public class CouchPotatoCacher : ICouchPotatoCacher
public class CouchPotatoSync : ICouchPotatoSync
{
public CouchPotatoCacher(ISettingsService<CouchPotatoSettings> cpSettings,
ICouchPotatoApi api, ILogger<CouchPotatoCacher> log, IOmbiContext ctx)
public CouchPotatoSync(ISettingsService<CouchPotatoSettings> cpSettings,
ICouchPotatoApi api, ILogger<CouchPotatoSync> log, IOmbiContext ctx)
{
_settings = cpSettings;
_api = api;
@ -52,7 +52,7 @@ namespace Ombi.Schedule.Jobs.Couchpotato
private readonly ISettingsService<CouchPotatoSettings> _settings;
private readonly ICouchPotatoApi _api;
private readonly ILogger<CouchPotatoCacher> _log;
private readonly ILogger<CouchPotatoSync> _log;
private readonly IOmbiContext _ctx;
public async Task Start()

@ -2,7 +2,7 @@
namespace Ombi.Schedule.Jobs.Couchpotato
{
public interface ICouchPotatoCacher
public interface ICouchPotatoSync
{
Task Start();
}

@ -4,7 +4,7 @@ using Ombi.Store.Entities;
namespace Ombi.Schedule.Jobs.Radarr
{
public interface IRadarrCacher
public interface IRadarrSync
{
Task CacheContent();
Task<IEnumerable<RadarrCache>> GetCachedContent();

@ -14,9 +14,9 @@ using Serilog;
namespace Ombi.Schedule.Jobs.Radarr
{
public class RadarrCacher : IRadarrCacher
public class RadarrSync : IRadarrSync
{
public RadarrCacher(ISettingsService<RadarrSettings> radarr, IRadarrApi radarrApi, ILogger<RadarrCacher> log, IOmbiContext ctx)
public RadarrSync(ISettingsService<RadarrSettings> radarr, IRadarrApi radarrApi, ILogger<RadarrSync> log, IOmbiContext ctx)
{
RadarrSettings = radarr;
RadarrApi = radarrApi;
@ -26,7 +26,7 @@ namespace Ombi.Schedule.Jobs.Radarr
private ISettingsService<RadarrSettings> RadarrSettings { get; }
private IRadarrApi RadarrApi { get; }
private ILogger<RadarrCacher> Logger { get; }
private ILogger<RadarrSync> Logger { get; }
private readonly IOmbiContext _ctx;
private static readonly SemaphoreSlim SemaphoreSlim = new SemaphoreSlim(1, 1);

@ -2,7 +2,7 @@
namespace Ombi.Schedule.Jobs.Sonarr
{
public interface ISonarrCacher
public interface ISonarrSync
{
Task Start();
}

@ -16,9 +16,9 @@ using Ombi.Store.Entities;
namespace Ombi.Schedule.Jobs.Sonarr
{
public class SonarrCacher : ISonarrCacher
public class SonarrSync : ISonarrSync
{
public SonarrCacher(ISettingsService<SonarrSettings> s, ISonarrApi api, ILogger<SonarrCacher> l, IOmbiContext ctx)
public SonarrSync(ISettingsService<SonarrSettings> s, ISonarrApi api, ILogger<SonarrSync> l, IOmbiContext ctx)
{
_settings = s;
_api = api;
@ -28,7 +28,7 @@ namespace Ombi.Schedule.Jobs.Sonarr
private readonly ISettingsService<SonarrSettings> _settings;
private readonly ISonarrApi _api;
private readonly ILogger<SonarrCacher> _log;
private readonly ILogger<SonarrSync> _log;
private readonly IOmbiContext _ctx;
private static readonly SemaphoreSlim SemaphoreSlim = new SemaphoreSlim(1, 1);

@ -2,6 +2,8 @@
{
public class JobSettings
{
public string EmbyContentSync { get; set; }
public string SonarrSync { get; set; }
public string RadarrSync { get; set; }
}
}

@ -44,14 +44,14 @@ namespace Ombi.Controllers
/// <param name="mapper">The mapper.</param>
/// <param name="templateRepo">The templateRepo.</param>
/// <param name="embyApi">The embyApi.</param>
/// <param name="radarrCacher">The radarrCacher.</param>
/// <param name="radarrSync">The radarrCacher.</param>
/// <param name="memCache">The memory cache.</param>
/// <param name="githubApi">The memory cache.</param>
public SettingsController(ISettingsResolver resolver,
IMapper mapper,
INotificationTemplatesRepository templateRepo,
IEmbyApi embyApi,
IRadarrCacher radarrCacher,
IRadarrSync radarrSync,
IMemoryCache memCache,
IGithubApi githubApi)
{
@ -59,7 +59,7 @@ namespace Ombi.Controllers
Mapper = mapper;
TemplateRepository = templateRepo;
_embyApi = embyApi;
_radarrCacher = radarrCacher;
_radarrSync = radarrSync;
_cache = memCache;
_githubApi = githubApi;
}
@ -68,7 +68,7 @@ namespace Ombi.Controllers
private IMapper Mapper { get; }
private INotificationTemplatesRepository TemplateRepository { get; }
private readonly IEmbyApi _embyApi;
private readonly IRadarrCacher _radarrCacher;
private readonly IRadarrSync _radarrSync;
private readonly IMemoryCache _cache;
private readonly IGithubApi _githubApi;
@ -332,7 +332,7 @@ namespace Ombi.Controllers
{
_cache.Remove(CacheKeys.RadarrRootProfiles);
_cache.Remove(CacheKeys.RadarrQualityProfiles);
BackgroundJob.Enqueue(() => _radarrCacher.CacheContent());
BackgroundJob.Enqueue(() => _radarrSync.CacheContent());
}
return result;
}

Loading…
Cancel
Save