small improvements
This commit is contained in:
parent
2553a150d1
commit
f5b6b1785f
@ -59,13 +59,13 @@ public abstract class Job : GlobalBase
|
|||||||
|
|
||||||
public void ResetProgress()
|
public void ResetProgress()
|
||||||
{
|
{
|
||||||
this.progressToken.increments = this.progressToken.increments - this.progressToken.incrementsCompleted;
|
this.progressToken.increments -= progressToken.incrementsCompleted;
|
||||||
this.lastExecution = DateTime.Now;
|
this.lastExecution = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExecutionEnqueue()
|
public void ExecutionEnqueue()
|
||||||
{
|
{
|
||||||
this.progressToken.increments = this.progressToken.increments - this.progressToken.incrementsCompleted;
|
this.progressToken.increments -= progressToken.incrementsCompleted;
|
||||||
this.lastExecution = recurrenceTime is not null ? DateTime.Now.Subtract((TimeSpan)recurrenceTime) : DateTime.UnixEpoch;
|
this.lastExecution = recurrenceTime is not null ? DateTime.Now.Subtract((TimeSpan)recurrenceTime) : DateTime.UnixEpoch;
|
||||||
this.progressToken.Standby();
|
this.progressToken.Standby();
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ public class JobBoss : GlobalBase
|
|||||||
queueHead.ResetProgress();
|
queueHead.ResetProgress();
|
||||||
jobQueue.Dequeue();
|
jobQueue.Dequeue();
|
||||||
ExportJobsList();
|
ExportJobsList();
|
||||||
Log($"Next job in {jobs.MinBy(job => job.nextExecution)?.nextExecution.Subtract(DateTime.Now)}");
|
Log($"Next job in {jobs.MinBy(job => job.nextExecution)?.nextExecution.Subtract(DateTime.Now)} {jobs.MinBy(job => job.nextExecution)?.id}");
|
||||||
}else if (queueHead.progressToken.state is ProgressToken.State.Standby)
|
}else if (queueHead.progressToken.state is ProgressToken.State.Standby)
|
||||||
{
|
{
|
||||||
Job[] subJobs = jobQueue.Peek().ExecuteReturnSubTasks().ToArray();
|
Job[] subJobs = jobQueue.Peek().ExecuteReturnSubTasks().ToArray();
|
||||||
|
Loading…
Reference in New Issue
Block a user