1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-28 02:27:13 +00:00

LastExecutionTime will only be updated if no targetId was found.

This commit is contained in:
Mark McDowall 2011-05-17 08:33:32 -07:00
parent 617b23f5e3
commit c0b7ebef4b

View file

@ -241,8 +241,11 @@ private void Execute(Type jobType, int targetId = 0)
_notificationProvider.Register(_notification); _notificationProvider.Register(_notification);
jobImplementation.Start(_notification, targetId); jobImplementation.Start(_notification, targetId);
_notification.Status = ProgressNotificationStatus.Completed; _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(); sw.Stop();
Logger.Debug("Job '{0}' successfully completed in {1} seconds", jobImplementation.Name, sw.Elapsed.Minutes, Logger.Debug("Job '{0}' successfully completed in {1} seconds", jobImplementation.Name, sw.Elapsed.Minutes,
sw.Elapsed.Seconds); sw.Elapsed.Seconds);