From f5b6b1785f0870b99467437cba0f65f1628c9646 Mon Sep 17 00:00:00 2001 From: glax Date: Tue, 19 Sep 2023 19:57:35 +0200 Subject: [PATCH] small improvements --- Tranga/Jobs/Job.cs | 4 ++-- Tranga/Jobs/JobBoss.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tranga/Jobs/Job.cs b/Tranga/Jobs/Job.cs index 86d5b19..f76253c 100644 --- a/Tranga/Jobs/Job.cs +++ b/Tranga/Jobs/Job.cs @@ -59,13 +59,13 @@ public abstract class Job : GlobalBase public void ResetProgress() { - this.progressToken.increments = this.progressToken.increments - this.progressToken.incrementsCompleted; + this.progressToken.increments -= progressToken.incrementsCompleted; this.lastExecution = DateTime.Now; } 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.progressToken.Standby(); } diff --git a/Tranga/Jobs/JobBoss.cs b/Tranga/Jobs/JobBoss.cs index 20a450b..8ab05e4 100644 --- a/Tranga/Jobs/JobBoss.cs +++ b/Tranga/Jobs/JobBoss.cs @@ -223,7 +223,7 @@ public class JobBoss : GlobalBase queueHead.ResetProgress(); jobQueue.Dequeue(); 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) { Job[] subJobs = jobQueue.Peek().ExecuteReturnSubTasks().ToArray();