#32 Added progress tracking to task (internal and log use for now)

This commit is contained in:
2023-06-01 22:05:48 +02:00
parent 15fc367263
commit 1bca99cb6a
5 changed files with 20 additions and 8 deletions

View File

@ -19,6 +19,9 @@ public abstract class TrangaTask
public Publication? publication { get; }
public string? language { get; }
[JsonIgnore]public ExecutionState state { get; set; }
[JsonIgnore] public float progress => (tasksFinished != 0f ? tasksFinished / tasksCount : 0f);
[JsonIgnore]public float tasksCount { get; set; }
[JsonIgnore]public float tasksFinished { get; set; }
public enum ExecutionState
{
@ -35,6 +38,8 @@ public abstract class TrangaTask
this.connectorName = connectorName;
this.task = task;
this.language = language;
this.tasksCount = 1;
this.tasksFinished = 0;
}
/// <summary>