mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-03 17:34:17 +02:00
Added ProgressToken state Cancelled
This commit is contained in:
@ -59,13 +59,15 @@ public abstract class Job : GlobalBase
|
||||
public void ResetProgress()
|
||||
{
|
||||
this.progressToken = new ProgressToken(this.progressToken.increments);
|
||||
this.lastExecution = DateTime.Now;
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
Log($"Cancelling {this}");
|
||||
this.progressToken.cancellationRequested = true;
|
||||
this.progressToken.Complete();
|
||||
this.progressToken.Cancel();
|
||||
this.lastExecution = DateTime.Now;
|
||||
if(subJobs is not null)
|
||||
foreach(Job subJob in subJobs)
|
||||
subJob.Cancel();
|
||||
|
Reference in New Issue
Block a user