diff --git a/Tranga/Jobs/Job.cs b/Tranga/Jobs/Job.cs index d565ec1..010efb6 100644 --- a/Tranga/Jobs/Job.cs +++ b/Tranga/Jobs/Job.cs @@ -62,6 +62,12 @@ public abstract class Job : GlobalBase this.lastExecution = DateTime.Now; } + public void ExecuteNow() + { + ResetProgress(); + this.lastExecution = DateTime.UnixEpoch; + } + public void Cancel() { Log($"Cancelling {this}"); diff --git a/Tranga/Jobs/JobBoss.cs b/Tranga/Jobs/JobBoss.cs index 5cfe59f..4fa4cb5 100644 --- a/Tranga/Jobs/JobBoss.cs +++ b/Tranga/Jobs/JobBoss.cs @@ -130,6 +130,7 @@ public class JobBoss : GlobalBase Queue connectorJobQueue = mangaConnectorJobQueue[job.mangaConnector]; if(!connectorJobQueue.Contains(job)) connectorJobQueue.Enqueue(job); + job.ExecuteNow(); } public void AddJobsToQueue(IEnumerable jobs)