removed supports backlog, updated some logs in job provider.

This commit is contained in:
kay.one 2011-05-20 00:39:05 -07:00
parent 5ab104dec6
commit 87ff2d1deb
2 changed files with 11 additions and 9 deletions

View File

@ -110,19 +110,19 @@ namespace NzbDrone.Core.Providers.Jobs
/// <remarks>Job is only added to the queue if same job with the same targetId doesn't already exist in the queue.</remarks>
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<Type, int>(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;
}
}

View File

@ -13,7 +13,5 @@ namespace NzbDrone.Core.Repository
public String IndexProviderType { get; set; }
public String Name { get; set; }
public Boolean SupportsBacklog { get; set; }
}
}