1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-01-22 05:10:01 +02:00

Fix get progress loading

This commit is contained in:
Patrik J. Braun 2023-09-20 23:34:05 +02:00
parent 182fbb8815
commit a6bfced5f0

View File

@ -40,7 +40,12 @@ export class JobManager implements IJobListener {
public getProgresses(): { [id: string]: OnTimerJobProgressDTO } {
const prg = Utils.clone(this.progressManager.Progresses);
this.timers.forEach(t => (prg[JobDTOUtils.getHashName(t.schedule.jobName, t.schedule.config)] as OnTimerJobProgressDTO).onTimer = true);
this.timers.forEach(t => {
if (!prg[JobDTOUtils.getHashName(t.schedule.jobName, t.schedule.config)]) {
return;
}
(prg[JobDTOUtils.getHashName(t.schedule.jobName, t.schedule.config)] as OnTimerJobProgressDTO).onTimer = true;
});
return prg;
}