removed supports backlog, updated some logs in job provider.
This commit is contained in:
parent
5ab104dec6
commit
87ff2d1deb
|
@ -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>
|
/// <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)
|
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)
|
lock (Queue)
|
||||||
{
|
{
|
||||||
var queueTuple = new Tuple<Type, int>(jobType, targetId);
|
var queueTuple = new Tuple<Type, int>(jobType, targetId);
|
||||||
|
|
||||||
if (Queue.Contains(queueTuple))
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Queue.Add(queueTuple);
|
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();
|
ProcessQueue();
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.ErrorException("Error has occured in queue processor thread", e);
|
||||||
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_isRunning = false;
|
_isRunning = false;
|
||||||
|
@ -251,12 +255,12 @@ namespace NzbDrone.Core.Providers.Jobs
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
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.LastExecution = DateTime.Now;
|
||||||
settings.Success = false;
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,5 @@ namespace NzbDrone.Core.Repository
|
||||||
public String IndexProviderType { get; set; }
|
public String IndexProviderType { get; set; }
|
||||||
|
|
||||||
public String Name { get; set; }
|
public String Name { get; set; }
|
||||||
|
|
||||||
public Boolean SupportsBacklog { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue