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

Logging failed job reason

This commit is contained in:
Patrik J. Braun 2023-08-01 15:07:00 +02:00
parent 819ca1b80d
commit 540f3fe390

View File

@ -154,6 +154,7 @@ export abstract class Job<T extends Record<string, any> = Record<string, any>> i
this.run();
} catch (e) {
Logger.error(LOG_TAG, e);
this.Progress.log('Failed with: ' + (typeof e.toString === 'function') ? e.toString() : JSON.stringify(e));
this.Progress.State = JobProgressStates.failed;
}
});