fix(queue-worker): raise queue log level to info

This commit is contained in:
Gergo Moricz 2024-08-07 14:56:04 +02:00
parent 7bb922071c
commit 9df8719efa

View File

@ -20,10 +20,10 @@ if (process.env.ENV === 'production') {
const wsq = getWebScraperQueue(); const wsq = getWebScraperQueue();
async function processJob(job: Job, done) { async function processJob(job: Job, done) {
Logger.debug(`🐂 Worker taking job ${job.id}`); Logger.info(`🐂 Worker taking job ${job.id}`);
const lockInterval = setInterval(() => { const lockInterval = setInterval(() => {
Logger.debug(`🐂 Renewing lock for ${job.id}`); Logger.info(`🐂 Renewing lock for ${job.id}`);
job.extendLock(60000); job.extendLock(60000);
}, 15000); }, 15000);
@ -66,7 +66,7 @@ async function processJob(job: Job, done) {
pageOptions: job.data.pageOptions, pageOptions: job.data.pageOptions,
origin: job.data.origin, origin: job.data.origin,
}); });
Logger.debug(`🐂 Job done ${job.id}`); Logger.info(`🐂 Job done ${job.id}`);
clearInterval(lockInterval); clearInterval(lockInterval);
done(null, data); done(null, data);
} catch (error) { } catch (error) {