Ejemplo n.º 1
0
 public override void Run(IProgress <ICommand> progress = null)
 {
     logger.Info($"Getting Updates...");
     try
     {
         ReportInit(progress);
         Importer.CheckForDayFilters();
         ReportUpdate(progress, 9);
         Importer.CheckForCalendarUpdate(false);
         ReportUpdate(progress, 18);
         Importer.CheckForAnimeUpdate(false);
         ReportUpdate(progress, 27);
         Importer.CheckForTvDBUpdates(false);
         ReportUpdate(progress, 36);
         Importer.CheckForMyListSyncUpdate(false);
         ReportUpdate(progress, 45);
         Importer.CheckForTraktAllSeriesUpdate(false);
         ReportUpdate(progress, 55);
         Importer.CheckForTraktTokenUpdate(false);
         ReportUpdate(progress, 64);
         Importer.CheckForMyListStatsUpdate(false);
         ReportUpdate(progress, 73);
         Importer.CheckForAniDBFileUpdate(false);
         ReportUpdate(progress, 82);
         Importer.UpdateAniDBTitles();
         ReportUpdate(progress, 91);
         Importer.SendUserInfoUpdate(false);
         Queue.Instance.Add(new CmdScheduleUpdate(), TriggerDateTime.AddSeconds(UpdateTimeInSeconds));
         ReportFinish(progress);
     }
     catch (Exception ex)
     {
         ReportError(progress, $"Error processing CmdScheduleUpdate - {ex}", ex);
     }
 }
Ejemplo n.º 2
0
 public override void Run(IProgress <ICommand> progress = null)
 {
     logger.Info("Executing log rotation.");
     try
     {
         ReportInit(progress);
         LogRotator.Instance.Start();
         Queue.Instance.Add(new CmdScheduleLogRotation(), TriggerDateTime.AddSeconds(LogRotationTimeInSeconds));
         ReportFinish(progress);
     }
     catch (Exception e)
     {
         ReportError(progress, $"Error processing CmdLogRotation:", e);
     }
 }
Ejemplo n.º 3
0
 public override void Run(IProgress <ICommand> progress = null)
 {
     logger.Info($"Getting Updates...");
     try
     {
         ReportInit(progress);
         //Do Nothing ???
         Queue.Instance.Add(new CmdScheduleShortUpdate(), TriggerDateTime.AddSeconds(UpdateTimeInSeconds));
         ReportFinish(progress);
     }
     catch (Exception ex)
     {
         ReportError(progress, $"Error processing CmdScheduleShortUpdate - {ex}", ex);
     }
 }