From d358147673ad38e825126c6e7b23caf5819ab99a Mon Sep 17 00:00:00 2001 From: glax Date: Fri, 19 May 2023 16:35:27 +0200 Subject: [PATCH] Moved lastExecuted update to TaskExecutor.Execute --- Tranga/TaskExecutor.cs | 1 + Tranga/TaskManager.cs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/TaskExecutor.cs b/Tranga/TaskExecutor.cs index 07111c5..9b26e28 100644 --- a/Tranga/TaskExecutor.cs +++ b/Tranga/TaskExecutor.cs @@ -7,6 +7,7 @@ public static class TaskExecutor Connector? connector = connectors.FirstOrDefault(c => c.name == trangaTask.connectorName); if (connector is null) throw new ArgumentException($"Connector {trangaTask.connectorName} is not a known connector."); + trangaTask.lastExecuted = DateTime.Now; switch (trangaTask.task) { diff --git a/Tranga/TaskManager.cs b/Tranga/TaskManager.cs index a9e70ea..134afc7 100644 --- a/Tranga/TaskManager.cs +++ b/Tranga/TaskManager.cs @@ -29,7 +29,6 @@ public class TaskManager { if(task.ShouldExecute()) TaskExecutor.Execute(this.connectors, task, this._chapterCollection); - task.lastExecuted = DateTime.Now; } Thread.Sleep(1000); }