mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
#150 split out the cache subscriptions to make sure they subscribe properly
This commit is contained in:
parent
5f67302b32
commit
e707837bf5
1 changed files with 9 additions and 5 deletions
|
@ -66,18 +66,22 @@ namespace PlexRequests.Services
|
||||||
private ICouchPotatoCacher CpCacher { get; }
|
private ICouchPotatoCacher CpCacher { get; }
|
||||||
private ISonarrCacher SonarrCacher { get; }
|
private ISonarrCacher SonarrCacher { get; }
|
||||||
private ISickRageCacher SickRageCacher { get; }
|
private ISickRageCacher SickRageCacher { get; }
|
||||||
private IDisposable UpdateSubscription { get; set; }
|
private IDisposable CpSubscription { get; set; }
|
||||||
|
private IDisposable SonarrSubscription { get; set; }
|
||||||
|
private IDisposable SickRageSubscription { get; set; }
|
||||||
|
|
||||||
public void Start(Configuration c)
|
public void Start(Configuration c)
|
||||||
{
|
{
|
||||||
UpdateSubscription?.Dispose();
|
CpSubscription?.Dispose();
|
||||||
|
SonarrSubscription?.Dispose();
|
||||||
|
SickRageSubscription?.Dispose();
|
||||||
|
|
||||||
Task.Factory.StartNew(() => CpCacher.Queued(-1));
|
Task.Factory.StartNew(() => CpCacher.Queued(-1));
|
||||||
Task.Factory.StartNew(() => SonarrCacher.Queued(-1));
|
Task.Factory.StartNew(() => SonarrCacher.Queued(-1));
|
||||||
Task.Factory.StartNew(() => SickRageCacher.Queued(-1));
|
Task.Factory.StartNew(() => SickRageCacher.Queued(-1));
|
||||||
UpdateSubscription = Observable.Interval(c.Intervals.Notification).Subscribe(CpCacher.Queued);
|
CpSubscription = Observable.Interval(c.Intervals.Notification).Subscribe(CpCacher.Queued);
|
||||||
UpdateSubscription = Observable.Interval(c.Intervals.Notification).Subscribe(SonarrCacher.Queued);
|
SonarrSubscription = Observable.Interval(c.Intervals.Notification).Subscribe(SonarrCacher.Queued);
|
||||||
UpdateSubscription = Observable.Interval(c.Intervals.Notification).Subscribe(SickRageCacher.Queued);
|
SickRageSubscription = Observable.Interval(c.Intervals.Notification).Subscribe(SickRageCacher.Queued);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Execute()
|
public void Execute()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue