@punks/backend-entity-manager 0.0.261 → 0.0.262

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/dist/cjs/index.js CHANGED
@@ -21865,9 +21865,11 @@ function differenceInMinutes(dateLeft, dateRight, options) {
21865
21865
  return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
21866
21866
  }
21867
21867
 
21868
- exports.OperationLockService = class OperationLockService {
21868
+ var OperationLockService_1;
21869
+ exports.OperationLockService = OperationLockService_1 = class OperationLockService {
21869
21870
  constructor(operations) {
21870
21871
  this.operations = operations;
21872
+ this.logger = backendCore.Log.getLogger(OperationLockService_1.name);
21871
21873
  this.executeExclusive = async (input) => {
21872
21874
  const lock = await this.operations.acquire({
21873
21875
  lockUid: input.lockUid,
@@ -21905,9 +21907,12 @@ exports.OperationLockService = class OperationLockService {
21905
21907
  this.isLockExpired = (item, refDate, timeoutMinutes) => {
21906
21908
  return differenceInMinutes(refDate, item.createdOn) > timeoutMinutes;
21907
21909
  };
21910
+ if (!operations) {
21911
+ this.logger.warn(`Cannot resolve locks repository: ${getEntityManagerProviderToken("OperationsLockRepository")}`);
21912
+ }
21908
21913
  }
21909
21914
  };
21910
- exports.OperationLockService = __decorate([
21915
+ exports.OperationLockService = OperationLockService_1 = __decorate([
21911
21916
  common.Injectable(),
21912
21917
  __param(0, common.Optional()),
21913
21918
  __param(0, common.Inject(getEntityManagerProviderToken("OperationsLockRepository"))),