@nest-omni/core 3.1.1-11 → 3.1.1-12

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": "3.1.1-11",
3
+ "version": "3.1.1-12",
4
4
  "description": "A comprehensive NestJS framework for building enterprise-grade applications with best practices",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -114,7 +114,7 @@ function createWorkerDecoratorWithLock(baseDecorator, decoratorName, lockKey, op
114
114
  logger.log(`Task completed successfully in ${duration}ms`);
115
115
  }
116
116
  if (onSuccess) {
117
- yield onSuccess(duration);
117
+ yield onSuccess.call(this, duration);
118
118
  }
119
119
  return result;
120
120
  }
@@ -134,7 +134,7 @@ function createWorkerDecoratorWithLock(baseDecorator, decoratorName, lockKey, op
134
134
  logger.error(`Task failed after ${duration}ms: ${error.message}`, error.stack);
135
135
  }
136
136
  if (onError) {
137
- yield onError(error);
137
+ yield onError.call(this, error);
138
138
  }
139
139
  throw error;
140
140
  }
@@ -199,7 +199,7 @@ function WorkerTimeoutWithLock(timeout, lockKeyOrOptions, lockTtl) {
199
199
  }
200
200
  else {
201
201
  lockKey = generateLockKey(target.constructor.name, String(propertyKey));
202
- options = lockKeyOrOptions;
202
+ options = Object.assign({ lockTtl: 300000 }, lockKeyOrOptions);
203
203
  }
204
204
  return createWorkerDecoratorWithLock((0, schedule_1.Timeout)(timeout), 'WorkerTimeoutWithLock', lockKey, options)(target, propertyKey, descriptor);
205
205
  };