@mcma/data
Advanced tools
Comparing version 0.13.0 to 0.13.1
@@ -13,3 +13,3 @@ "use strict"; | ||
async lock() { | ||
var _a, _b, _c, _d, _e; | ||
var _a, _b, _c; | ||
if (this.hasLock) { | ||
@@ -23,3 +23,3 @@ throw new core_1.McmaException("Cannot lock when already locked"); | ||
const lockData = await this.getLockData(); | ||
this.hasLock = ((_b = lockData) === null || _b === void 0 ? void 0 : _b.mutexHolder) === this.mutexHolder && ((_c = lockData) === null || _c === void 0 ? void 0 : _c.versionId) === this.versionId; | ||
this.hasLock = (lockData === null || lockData === void 0 ? void 0 : lockData.mutexHolder) === this.mutexHolder && (lockData === null || lockData === void 0 ? void 0 : lockData.versionId) === this.versionId; | ||
} | ||
@@ -30,3 +30,3 @@ catch (error) { | ||
if (lockData.timestamp < Date.now() - this.lockTimeout) { | ||
(_d = this.logger) === null || _d === void 0 ? void 0 : _d.warn("Deleting stale lock for mutex '" + this.mutexName + "' by '" + lockData.mutexHolder + "'"); | ||
(_b = this.logger) === null || _b === void 0 ? void 0 : _b.warn("Deleting stale lock for mutex '" + this.mutexName + "' by '" + lockData.mutexHolder + "'"); | ||
try { | ||
@@ -44,3 +44,3 @@ await this.deleteLockData(lockData.versionId); | ||
} | ||
(_e = this.logger) === null || _e === void 0 ? void 0 : _e.debug("Acquired lock for mutex '" + this.mutexName + "' by '" + this.mutexHolder + "'"); | ||
(_c = this.logger) === null || _c === void 0 ? void 0 : _c.debug("Acquired lock for mutex '" + this.mutexName + "' by '" + this.mutexHolder + "'"); | ||
} | ||
@@ -47,0 +47,0 @@ async unlock() { |
{ | ||
"name": "@mcma/data", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"description": "Node module with helper utils for dealing with data in the EBU MCMA framework", | ||
@@ -32,6 +32,6 @@ "engines": { | ||
"peerDependencies": { | ||
"@mcma/core": "0.13.0" | ||
"@mcma/core": "0.13.1" | ||
}, | ||
"devDependencies": { | ||
"@mcma/core": "0.13.0", | ||
"@mcma/core": "0.13.1", | ||
"@types/node": "^13.7.4", | ||
@@ -38,0 +38,0 @@ "jasmine": "^3.3.1" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11060