From b136d5c4bc6d67625a1d14bbfbb6f006ffef750f Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 12 Jan 2024 21:07:01 +0800 Subject: [PATCH] Refactor --- pkg/bull-queue-admin/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/bull-queue-admin/index.js b/pkg/bull-queue-admin/index.js index 21569142b..c1152b674 100644 --- a/pkg/bull-queue-admin/index.js +++ b/pkg/bull-queue-admin/index.js @@ -45,7 +45,6 @@ passport.deserializeUser((user, cb) => { const run = async () => { const secrets = await readYamlFile(process.env.SECRETS_FILE) const redisOptions = (secrets) => { - console.log('secrets: ', secrets) if (secrets.REDIS_URL?.startsWith('rediss://') && secrets.REDIS_CERT) { return { tls: { @@ -60,8 +59,13 @@ const run = async () => { } } - console.log('redis options:', redisOptions(secrets)) - const connection = new Redis(secrets.REDIS_URL, redisOptions(secrets)) + const connection = new Redis(secrets.REDIS_URL, { + tls: { + cert: secrets.REDIS_CERT, + rejectUnauthorized: false, + }, + maxRetriesPerRequest: null, + }) console.log('set connection: ', connection) const rssRefreshFeed = new QueueMQ('rssRefreshFeed', {