Skip to content

Commit

Permalink
Fix initialize queue to bull
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadranjbarz committed Jan 6, 2022
1 parent da10f2b commit f32606d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/analytics/segmentQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import { sleep } from '../utils/utils';
import { redisConfig } from '../redis';
const analytics = getAnalytics();

const sendSegmentEventQueue = new Bull('send-segment-event', redisConfig);
const sendSegmentEventQueue = new Bull('send-segment-event', {
redis: redisConfig,
});

const numberOfVerifyDonationConcurrentJob = 1;

Expand Down
4 changes: 3 additions & 1 deletion src/services/syncDonationsWithNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import Bull from 'bull';
import config from '../config';
import { redisConfig } from '../redis';

const verifyDonationsQueue = new Bull('verify-donations-queue', redisConfig);
const verifyDonationsQueue = new Bull('verify-donations-queue', {
redis: redisConfig,
});
const TWO_MINUTES = 1000 * 60 * 2;
setInterval(async () => {
const verifyDonationsQueueCount = await verifyDonationsQueue.count();
Expand Down

0 comments on commit f32606d

Please sign in to comment.