@clonegod/ttd-sui-common 1.0.52 → 1.0.53

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.
@@ -70,7 +70,7 @@ class SimpleRedisClient {
70
70
  });
71
71
  }
72
72
  withLock(lock_identifier_1, callback_1) {
73
- return __awaiter(this, arguments, void 0, function* (lock_identifier, callback, release_lock_delay_ms = 2000) {
73
+ return __awaiter(this, arguments, void 0, function* (lock_identifier, callback, release_lock_delay_ms = 500) {
74
74
  const lock_key = this.getLockKey(lock_identifier);
75
75
  const lock_value = `${Date.now()}-${Math.random().toString(36).substring(2, 15)}`;
76
76
  let retries = 0;
@@ -96,6 +96,7 @@ class SimpleRedisClient {
96
96
  if (acquired) {
97
97
  const release_delay = parseInt(process.env.NONCE_LOCK_RELEASE_DELAY_MS || String(release_lock_delay_ms));
98
98
  if (release_delay > 0) {
99
+ (0, dist_1.log_warn)(`withLock release_lock_delay_ms=${release_delay}ms`);
99
100
  yield (0, dist_1.sleep)(release_delay);
100
101
  }
101
102
  yield this.releaseLock(lock_key, lock_value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sui-common",
3
- "version": "1.0.52",
3
+ "version": "1.0.53",
4
4
  "description": "Sui common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",