@helyx/bot 0.4.29 → 0.4.31
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/CHANGELOG.md +12 -0
- package/dist/numeric-write-behind-redis.js +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Publish the Redis barrier timing fix from canonical package contents.
|
|
8
|
+
|
|
9
|
+
## 0.4.30
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Stabilize Redis write-behind barrier lease timestamps.
|
|
14
|
+
|
|
3
15
|
## 0.4.29
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -508,6 +508,7 @@ export class RedisNumericWriteBehindService {
|
|
|
508
508
|
async #acquireBarrier(scope, kind, guildId, subjectId) {
|
|
509
509
|
this.#assertAvailable(scope);
|
|
510
510
|
const barrierId = randomUUID();
|
|
511
|
+
const now = Date.now();
|
|
511
512
|
const result = await this.#redis.eval(ACQUIRE_BARRIER_SCRIPT, {
|
|
512
513
|
keys: keysFor(this.#prefix, scope),
|
|
513
514
|
arguments: [
|
|
@@ -515,8 +516,8 @@ export class RedisNumericWriteBehindService {
|
|
|
515
516
|
guildId,
|
|
516
517
|
subjectId,
|
|
517
518
|
barrierId,
|
|
518
|
-
String(
|
|
519
|
-
String(
|
|
519
|
+
String(now),
|
|
520
|
+
String(now + this.#barrierLeaseMs),
|
|
520
521
|
],
|
|
521
522
|
});
|
|
522
523
|
if (Number(result) === 2)
|