2
0

Switch Execution State to Running when executing

This commit is contained in:
glax 2023-05-31 21:40:00 +02:00
parent 16c1b5c506
commit f892db7dda
3 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,10 @@ public abstract class TrangaTask
this.language = language; this.language = language;
} }
/// <summary>
/// Set state to running
/// </summary>
/// <param name="taskManager"></param>
public abstract void Execute(TaskManager taskManager); public abstract void Execute(TaskManager taskManager);
/// <returns>True if elapsed time since last execution is greater than set interval</returns> /// <returns>True if elapsed time since last execution is greater than set interval</returns>

View File

@ -8,6 +8,7 @@ public class DownloadNewChaptersTask : TrangaTask
public override void Execute(TaskManager taskManager) public override void Execute(TaskManager taskManager)
{ {
this.state = ExecutionState.Running;
Publication pub = (Publication)this.publication!; Publication pub = (Publication)this.publication!;
Connector connector = taskManager.GetConnector(this.connectorName); Connector connector = taskManager.GetConnector(this.connectorName);

View File

@ -8,6 +8,7 @@ public class UpdateKomgaLibraryTask : TrangaTask
public override void Execute(TaskManager taskManager) public override void Execute(TaskManager taskManager)
{ {
this.state = ExecutionState.Running;
if (taskManager.komga is null) if (taskManager.komga is null)
return; return;
Komga komga = taskManager.komga; Komga komga = taskManager.komga;