UNPKG

@takentrade/takentrade-libs

Version:
29 lines (28 loc) 970 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BullConfigFactory = void 0; class BullConfigFactory { configService; constructor(configService) { this.configService = configService; } createSharedConfiguration() { return { connection: { host: this.configService.get('REDIS_HOST'), port: this.configService.get('REDIS_PORT'), password: this.configService.get('REDIS_PASSWORD'), }, defaultJobOptions: { removeOnComplete: false, // Keep completed jobs available for inspection removeOnFail: false, // Keep failed jobs for debugging attempts: 3, // Default retry attempts backoff: { type: 'exponential', delay: 1000, }, }, }; } } exports.BullConfigFactory = BullConfigFactory;