Moved lastExecuted update to TaskExecutor.Execute
This commit is contained in:
parent
dd58efce06
commit
d358147673
@ -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)
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ public class TaskManager
|
||||
{
|
||||
if(task.ShouldExecute())
|
||||
TaskExecutor.Execute(this.connectors, task, this._chapterCollection);
|
||||
task.lastExecuted = DateTime.Now;
|
||||
}
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user