Fixed bug where tasks would instantly failed when launched #14
This commit is contained in:
parent
6485b8744f
commit
89c80d2997
@ -49,7 +49,7 @@ public abstract class TrangaTask
|
|||||||
this.task = task;
|
this.task = task;
|
||||||
this.progress = 0f;
|
this.progress = 0f;
|
||||||
this.executionStarted = DateTime.Now;
|
this.executionStarted = DateTime.Now;
|
||||||
this.lastChange = DateTime.Now;
|
this.lastChange = DateTime.MaxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float IncrementProgress(float amount)
|
public float IncrementProgress(float amount)
|
||||||
@ -83,6 +83,7 @@ public abstract class TrangaTask
|
|||||||
logger?.WriteLine(this.GetType().ToString(), $"Executing Task {this}");
|
logger?.WriteLine(this.GetType().ToString(), $"Executing Task {this}");
|
||||||
this.state = ExecutionState.Running;
|
this.state = ExecutionState.Running;
|
||||||
this.executionStarted = DateTime.Now;
|
this.executionStarted = DateTime.Now;
|
||||||
|
this.lastChange = DateTime.Now;
|
||||||
ExecuteTask(taskManager, logger);
|
ExecuteTask(taskManager, logger);
|
||||||
this.lastExecuted = DateTime.Now;
|
this.lastExecuted = DateTime.Now;
|
||||||
this.state = ExecutionState.Waiting;
|
this.state = ExecutionState.Waiting;
|
||||||
|
Loading…
Reference in New Issue
Block a user