@nest-omni/core 1.0.51-0 → 1.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nest-omni/core",
3
- "version": "1.0.51-0",
3
+ "version": "1.0.52",
4
4
  "description": "framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -228,8 +228,28 @@ let ApiConfigService = ApiConfigService_1 = class ApiConfigService {
228
228
  }
229
229
  get bullConfig() {
230
230
  return {
231
- redis: this.ioRedisConfig,
231
+ redis: Object.assign(Object.assign({}, this.ioRedisConfig), { retryStrategy: (times) => Math.min(times * 1000, 5000) }),
232
232
  prefix: this.getString('BULL_PREFIX'),
233
+ defaultJobOptions: {
234
+ removeOnComplete: true,
235
+ removeOnFail: this.getNumber('BULL_REMOVE_FAILED_DAYS') * 24 * 3600 ||
236
+ 30 * 24 * 3600,
237
+ attempts: this.getNumber('BULL_JOB_ATTEMPTS') || 5,
238
+ backoff: {
239
+ type: 'exponential',
240
+ delay: this.getNumber('BULL_JOB_BACKOFF_DELAY_MS') || 5000,
241
+ },
242
+ timeout: this.getNumber('BULL_JOB_TIMEOUT_MS') || 30 * 1000,
243
+ },
244
+ settings: {
245
+ maxStalledCount: 2,
246
+ guardInterval: 5000,
247
+ retryProcessDelay: 1000,
248
+ },
249
+ limiter: {
250
+ max: this.getNumber('BULL_MAX_CONCURRENT_JOBS') || 100,
251
+ duration: 1000,
252
+ },
233
253
  };
234
254
  }
235
255
  cacheConfig() {