@fedify/postgres 2.0.0-dev.384 → 2.0.0-dev.385
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/mq.cjs +8 -1
- package/dist/mq.js +8 -1
- package/package.json +3 -3
package/dist/mq.cjs
CHANGED
|
@@ -199,11 +199,18 @@ var PostgresMessageQueue = class {
|
|
|
199
199
|
const duration = Temporal.Duration.from(delay);
|
|
200
200
|
const durationMs = duration.total("millisecond");
|
|
201
201
|
if (durationMs < 1) await serializedPoll();
|
|
202
|
-
else
|
|
202
|
+
else {
|
|
203
|
+
const timeout = setTimeout(() => {
|
|
204
|
+
timeouts.delete(timeout);
|
|
205
|
+
serializedPoll();
|
|
206
|
+
}, durationMs);
|
|
207
|
+
timeouts.add(timeout);
|
|
208
|
+
}
|
|
203
209
|
}, serializedPoll);
|
|
204
210
|
signal?.addEventListener("abort", () => {
|
|
205
211
|
listen.unlisten();
|
|
206
212
|
for (const timeout of timeouts) clearTimeout(timeout);
|
|
213
|
+
timeouts.clear();
|
|
207
214
|
});
|
|
208
215
|
while (!signal?.aborted) {
|
|
209
216
|
let timeout;
|
package/dist/mq.js
CHANGED
|
@@ -198,11 +198,18 @@ var PostgresMessageQueue = class {
|
|
|
198
198
|
const duration = Temporal.Duration.from(delay);
|
|
199
199
|
const durationMs = duration.total("millisecond");
|
|
200
200
|
if (durationMs < 1) await serializedPoll();
|
|
201
|
-
else
|
|
201
|
+
else {
|
|
202
|
+
const timeout = setTimeout(() => {
|
|
203
|
+
timeouts.delete(timeout);
|
|
204
|
+
serializedPoll();
|
|
205
|
+
}, durationMs);
|
|
206
|
+
timeouts.add(timeout);
|
|
207
|
+
}
|
|
202
208
|
}, serializedPoll);
|
|
203
209
|
signal?.addEventListener("abort", () => {
|
|
204
210
|
listen.unlisten();
|
|
205
211
|
for (const timeout of timeouts) clearTimeout(timeout);
|
|
212
|
+
timeouts.clear();
|
|
206
213
|
});
|
|
207
214
|
while (!signal?.aborted) {
|
|
208
215
|
let timeout;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/postgres",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.385+de25d9e9",
|
|
4
4
|
"description": "PostgreSQL drivers for Fedify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fedify",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"postgres": "^3.4.7",
|
|
77
|
-
"@fedify/fedify": "^2.0.0-dev.
|
|
77
|
+
"@fedify/fedify": "^2.0.0-dev.385+de25d9e9"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@std/async": "npm:@jsr/std__async@^1.0.13",
|
|
81
81
|
"tsdown": "^0.12.9",
|
|
82
82
|
"typescript": "^5.9.3",
|
|
83
83
|
"@fedify/fixture": "^2.0.0",
|
|
84
|
-
"@fedify/testing": "^2.0.0-dev.
|
|
84
|
+
"@fedify/testing": "^2.0.0-dev.385+de25d9e9"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build:self": "tsdown",
|