mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-01-31 00:47:30 +01:00
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);
|
Connector? connector = connectors.FirstOrDefault(c => c.name == trangaTask.connectorName);
|
||||||
if (connector is null)
|
if (connector is null)
|
||||||
throw new ArgumentException($"Connector {trangaTask.connectorName} is not a known connector.");
|
throw new ArgumentException($"Connector {trangaTask.connectorName} is not a known connector.");
|
||||||
|
trangaTask.lastExecuted = DateTime.Now;
|
||||||
|
|
||||||
switch (trangaTask.task)
|
switch (trangaTask.task)
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,6 @@ public class TaskManager
|
|||||||
{
|
{
|
||||||
if(task.ShouldExecute())
|
if(task.ShouldExecute())
|
||||||
TaskExecutor.Execute(this.connectors, task, this._chapterCollection);
|
TaskExecutor.Execute(this.connectors, task, this._chapterCollection);
|
||||||
task.lastExecuted = DateTime.Now;
|
|
||||||
}
|
}
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user