Moved lastExecuted update to TaskExecutor.Execute

This commit is contained in:
glax 2023-05-19 16:35:27 +02:00
parent dd58efce06
commit d358147673
2 changed files with 1 additions and 1 deletions

View File

@ -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)
{

View File

@ -29,7 +29,6 @@ public class TaskManager
{
if(task.ShouldExecute())
TaskExecutor.Execute(this.connectors, task, this._chapterCollection);
task.lastExecuted = DateTime.Now;
}
Thread.Sleep(1000);
}