From 87ff2d1deb61dda479031a3f31aaea28eb4535f1 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Fri, 20 May 2011 00:39:05 -0700 Subject: [PATCH] removed supports backlog, updated some logs in job provider. --- NzbDrone.Core/Providers/Jobs/JobProvider.cs | 18 +++++++++++------- NzbDrone.Core/Repository/IndexerSetting.cs | 2 -- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/NzbDrone.Core/Providers/Jobs/JobProvider.cs b/NzbDrone.Core/Providers/Jobs/JobProvider.cs index 56ad1ee12..9f382481f 100644 --- a/NzbDrone.Core/Providers/Jobs/JobProvider.cs +++ b/NzbDrone.Core/Providers/Jobs/JobProvider.cs @@ -110,19 +110,19 @@ namespace NzbDrone.Core.Providers.Jobs /// Job is only added to the queue if same job with the same targetId doesn't already exist in the queue. public virtual bool QueueJob(Type jobType, int targetId = 0) { - Logger.Debug("Adding job {0} ->{1} to the queue", jobType, targetId); + Logger.Debug("Adding job ({0}:{1}) to the queue", jobType, targetId); lock (Queue) { var queueTuple = new Tuple(jobType, targetId); if (Queue.Contains(queueTuple)) { - Logger.Info("Job {0} ->{1} already exists in queue. Skipping.", jobType, targetId); + Logger.Info("Job ({0}:{1}) already exists in queue. Skipping.", jobType, targetId); return false; } Queue.Add(queueTuple); - Logger.Debug("Job {0} ->{1} added to the queue", jobType, targetId); + Logger.Debug("Job ({0}:{1}) added to the queue", jobType, targetId); } @@ -146,6 +146,10 @@ namespace NzbDrone.Core.Providers.Jobs { ProcessQueue(); } + catch (Exception e) + { + Logger.ErrorException("Error has occured in queue processor thread", e); + } finally { _isRunning = false; @@ -251,12 +255,12 @@ namespace NzbDrone.Core.Providers.Jobs } catch (Exception e) { + Logger.ErrorException("An error has occurred while executing timer job " + jobImplementation.Name, e); + _notification.Status = ProgressNotificationStatus.Failed; + _notification.CurrentMessage = jobImplementation.Name + " Failed."; + settings.LastExecution = DateTime.Now; settings.Success = false; - - Logger.ErrorException("An error has occurred while executing timer job " + jobImplementation.Name, e); - _notification.CurrentMessage = jobImplementation.Name + " Failed."; - _notification.Status = ProgressNotificationStatus.Failed; } } diff --git a/NzbDrone.Core/Repository/IndexerSetting.cs b/NzbDrone.Core/Repository/IndexerSetting.cs index f39f282f1..471552728 100644 --- a/NzbDrone.Core/Repository/IndexerSetting.cs +++ b/NzbDrone.Core/Repository/IndexerSetting.cs @@ -13,7 +13,5 @@ namespace NzbDrone.Core.Repository public String IndexProviderType { get; set; } public String Name { get; set; } - - public Boolean SupportsBacklog { get; set; } } } \ No newline at end of file