@rotorsoft/act 1.23.11 → 1.23.13
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/.tsbuildinfo +1 -1
- package/dist/@types/internal/drain-cycle.d.ts.map +1 -1
- package/dist/@types/types/ports.d.ts +5 -0
- package/dist/@types/types/ports.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2430,15 +2430,15 @@ async function run_drain_cycle(ops, registry, batch_handlers, handle, handle_bat
|
|
|
2430
2430
|
return handle({ ...lease, at }, payloads);
|
|
2431
2431
|
})
|
|
2432
2432
|
);
|
|
2433
|
+
const blocked = await ops.block(
|
|
2434
|
+
handled.filter(({ block: block2 }) => block2).map(({ lease, error }) => ({ ...lease, error }))
|
|
2435
|
+
);
|
|
2433
2436
|
const acked = await ops.ack(
|
|
2434
2437
|
handled.flatMap((h, i) => {
|
|
2435
2438
|
const advance = h.handled > 0 ? h.acked_at : leased[i].at;
|
|
2436
2439
|
return h.defer !== void 0 ? { ...h.lease, at: advance, due: h.defer, retry: -1 } : h.next_attempt_at !== void 0 ? { ...h.lease, at: advance, due: h.next_attempt_at } : h.handled > 0 || !h.error ? { ...h.lease, at: h.acked_at } : [];
|
|
2437
2440
|
})
|
|
2438
2441
|
);
|
|
2439
|
-
const blocked = await ops.block(
|
|
2440
|
-
handled.filter(({ block: block2 }) => block2).map(({ lease, error }) => ({ ...lease, error }))
|
|
2441
|
-
);
|
|
2442
2442
|
const closeable = handled.filter((h) => h.close !== void 0).map((h) => h.close);
|
|
2443
2443
|
return { leased, fetched, handled, acked, blocked, closeable };
|
|
2444
2444
|
}
|