From c0b7ebef4b839da8e4fe93bfe77e2ea1a8c91e9e Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 17 May 2011 08:33:32 -0700 Subject: [PATCH] LastExecutionTime will only be updated if no targetId was found. --- NzbDrone.Core/Providers/Jobs/JobProvider.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Core/Providers/Jobs/JobProvider.cs b/NzbDrone.Core/Providers/Jobs/JobProvider.cs index 0aef24f9c..5f8e00eec 100644 --- a/NzbDrone.Core/Providers/Jobs/JobProvider.cs +++ b/NzbDrone.Core/Providers/Jobs/JobProvider.cs @@ -241,8 +241,11 @@ private void Execute(Type jobType, int targetId = 0) _notificationProvider.Register(_notification); jobImplementation.Start(_notification, targetId); _notification.Status = ProgressNotificationStatus.Completed; - settings.LastExecution = DateTime.Now;//TODO: Should only be updated if targetId is 0. - settings.Success = true; + + if (targetId != 0) + settings.LastExecution = DateTime.Now; + + settings.Success = true; //TODO: Do we consider a job with a targetId as successful? sw.Stop(); Logger.Debug("Job '{0}' successfully completed in {1} seconds", jobImplementation.Name, sw.Elapsed.Minutes, sw.Elapsed.Seconds);