From 6bf201d6ea2546373c630dee8148434c09385558 Mon Sep 17 00:00:00 2001 From: unknown <89595418+unknownsrc@users.noreply.github.com> Date: Tue, 28 Mar 2023 19:35:38 +0200 Subject: [PATCH] memory leak prevention... --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 6bb83d5..18a91ee 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,10 @@ const queue = new BQueue('download', { host: process.env.REDIS_HOST, port: process.env.REDIS_PORT, password: process.env.REDIS_PASS, - } + }, + removeOnFailure: true, + removeOnSuccess: true, + storeJobs: false }) async function check() { @@ -104,7 +107,7 @@ queue.process(5, async function (job, done) { } }) -check() +checkChannel('UCFAiFyGs6oDiF1Nf-rRJpZA') // setInterval(() => { // check() // }, 300000) \ No newline at end of file