@rotorsoft/act 0.22.0 → 0.23.0
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/README.md +1 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/@types/adapters/InMemoryStore.d.ts.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -401,7 +401,11 @@ var InMemoryStore = class {
|
|
|
401
401
|
*/
|
|
402
402
|
async claim(lagging, leading, by, millis) {
|
|
403
403
|
await sleep();
|
|
404
|
-
const available = [...this._streams.values()].filter(
|
|
404
|
+
const available = [...this._streams.values()].filter(
|
|
405
|
+
(s) => s.is_avaliable && (s.at < 0 || this._events.some(
|
|
406
|
+
(e) => e.id > s.at && e.name !== SNAP_EVENT && (!s.source || RegExp(s.source).test(e.stream))
|
|
407
|
+
))
|
|
408
|
+
);
|
|
405
409
|
const lag = available.sort((a, b) => a.at - b.at).slice(0, lagging).map((s) => ({
|
|
406
410
|
stream: s.stream,
|
|
407
411
|
source: s.source,
|