mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
JobProvider now stores last execution and success
JobProvider is now wired working Job view ui is updated
This commit is contained in:
parent
6f73260ab7
commit
fa1b287d58
9 changed files with 65 additions and 72 deletions
|
@ -5,15 +5,22 @@ using System.Text;
|
|||
using System.Web;
|
||||
using System.Web.Caching;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Providers.Jobs;
|
||||
|
||||
namespace NzbDrone.Core
|
||||
{
|
||||
class WebTimer
|
||||
{
|
||||
private readonly JobProvider _jobProvider;
|
||||
|
||||
private static CacheItemRemovedCallback _onCacheRemove;
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public WebTimer(JobProvider jobProvider)
|
||||
{
|
||||
_jobProvider = jobProvider;
|
||||
}
|
||||
|
||||
public void StartTimer(int secondInterval)
|
||||
{
|
||||
_onCacheRemove = new CacheItemRemovedCallback(DoWork);
|
||||
|
@ -26,7 +33,7 @@ namespace NzbDrone.Core
|
|||
|
||||
public void DoWork(string k, object v, CacheItemRemovedReason r)
|
||||
{
|
||||
Logger.Info("Tick!");
|
||||
_jobProvider.RunScheduled();
|
||||
StartTimer(Convert.ToInt32(v));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue