From 6b583d61c3e80eb8a71d9e6c237b9f828dffbac9 Mon Sep 17 00:00:00 2001 From: unknown <89595418+unknownsrc@users.noreply.github.com> Date: Tue, 28 Mar 2023 19:22:47 +0200 Subject: [PATCH] concurrency --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index bf3aae7..6bb83d5 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,6 @@ const { PrismaClient } = require('@prisma/client') const prisma = new PrismaClient() const queue = new BQueue('download', { - concurrency: 4, redis: { host: process.env.REDIS_HOST, port: process.env.REDIS_PORT, @@ -75,7 +74,7 @@ async function checkChannel(channelId) { }) } -queue.process(async function (job, done) { +queue.process(5, async function (job, done) { const { video, id } = job.data logger.info({ message: `Starting to download ${video.title}, ${id}` })