Skip to content

Commit

Permalink
fix: Renamed the JobSchedulerService queue's name
Browse files Browse the repository at this point in the history
- Renamed from `scheduled-jobs:queue` to `scheduled-jobs-queue`, this is due to the BullMQ [v5.12.12](taskforcesh/bullmq@v5.12.11...v5.12.12) update that throws an error whenever a Queue has a semicolon in its name
  • Loading branch information
Adil committed Sep 4, 2024
1 parent b8a990c commit 0d4b5c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/medusa/src/services/__tests__/job-scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("JobSchedulerService", () => {

it("creates bull queue", () => {
expect(Queue).toHaveBeenCalledTimes(1)
expect(Queue).toHaveBeenCalledWith("scheduled-jobs:queue", {
expect(Queue).toHaveBeenCalledWith("scheduled-jobs-queue", {
connection: expect.any(Object),
prefix: "JobSchedulerService",
})
Expand Down
4 changes: 2 additions & 2 deletions packages/medusa/src/services/job-scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ export default class JobSchedulerService {
...(config.projectConfig.redis_options ?? {}),
})

this.queue_ = new Queue(`scheduled-jobs:queue`, {
this.queue_ = new Queue(`scheduled-jobs-queue`, {
connection,
prefix,
})

// Register scheduled job worker
this.worker_ = new Worker(
"scheduled-jobs:queue",
"scheduled-jobs-queue",
this.scheduledJobsWorker,
{
connection,
Expand Down

0 comments on commit 0d4b5c8

Please sign in to comment.