@takentrade/takentrade-libs
Version:
TakeNTrade shared libraries
29 lines (28 loc) • 970 B
JavaScript
;
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;