-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And added ioredis for a consistent redis connection, to fix the bullmq workers connection error
- Loading branch information
1 parent
04c106f
commit 95c80c3
Showing
8 changed files
with
40 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
import { Queue, QueueOptions } from 'bullmq'; | ||
import { Queue } from 'bullmq'; | ||
import { JIRA_JOB_NAME } from '../jobs/createJira'; | ||
import { GITLAB_JOB_NAME } from '../jobs/createGitlabIssue'; | ||
import { GITHUB_JOB_NAME } from '../jobs/createGithubIssue'; | ||
import { redisConnection } from './redis'; | ||
|
||
export const redisConfiguration: QueueOptions = { | ||
connection: { | ||
host: process.env.REDIS_HOST, | ||
port: Number.parseInt(process.env.REDIS_PORT ?? '6379'), | ||
} | ||
} | ||
|
||
export const jiraQueue = new Queue(JIRA_JOB_NAME, redisConfiguration); | ||
export const gitlabQueue = new Queue(GITLAB_JOB_NAME, redisConfiguration); | ||
export const githubQueue = new Queue(GITHUB_JOB_NAME, redisConfiguration); | ||
export const jiraQueue = new Queue(JIRA_JOB_NAME, { connection: redisConnection }); | ||
export const gitlabQueue = new Queue(GITLAB_JOB_NAME, { connection: redisConnection }); | ||
export const githubQueue = new Queue(GITHUB_JOB_NAME, { connection: redisConnection }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require('events').defaultMaxListeners = 70; | ||
import {Redis} from 'ioredis'; | ||
|
||
export const redisConnection = new Redis({ | ||
host: process.env.REDIS_HOST, | ||
port: Number.parseInt(process.env.REDIS_PORT ?? '6379'), | ||
maxRetriesPerRequest: null, | ||
}); |