From 654935e27c6a1b348ce76bf391e332f1ddf37ae4 Mon Sep 17 00:00:00 2001 From: mytlogos Date: Mon, 5 Sep 2022 14:58:07 +0200 Subject: [PATCH] fix(scraper): log job abort --- packages/scraper/src/scheduler/jobScheduler.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/scraper/src/scheduler/jobScheduler.ts b/packages/scraper/src/scheduler/jobScheduler.ts index 3e336cbb..1661485f 100644 --- a/packages/scraper/src/scheduler/jobScheduler.ts +++ b/packages/scraper/src/scheduler/jobScheduler.ts @@ -355,12 +355,16 @@ export class JobScheduler { // if aborting did not finish the job after 5 min // stop this process and exit as graceful as possible if (job.getRunningDuration() > hardMaxJobRunningTime) { - logger.error("Restarting Process due to long running jobs", { + logger.error("restarting Process due to long running job", { job_name: job.currentItem.name, job_id: job.id, }); gracefulShutdown(); } else if (!job.isAborted()) { + logger.error("aborting long running job", { + job_name: job.currentItem.name, + job_id: job.id, + }); job.abort(); } }