@rotorsoft/act 1.18.4 → 1.18.5
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/act.d.ts.map +1 -1
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3148,7 +3148,12 @@ var Act = class {
|
|
|
3148
3148
|
*/
|
|
3149
3149
|
async correlate(query = { after: -1, limit: 10 }) {
|
|
3150
3150
|
if (!this._drain) return { subscribed: 0, last_id: -1 };
|
|
3151
|
-
return this._scoped(() =>
|
|
3151
|
+
return this._scoped(async () => {
|
|
3152
|
+
const result = await this._correlate.correlate(query);
|
|
3153
|
+
if (result.subscribed > 0 && this._reactive_events.size > 0)
|
|
3154
|
+
this._arm_all();
|
|
3155
|
+
return result;
|
|
3156
|
+
});
|
|
3152
3157
|
}
|
|
3153
3158
|
/**
|
|
3154
3159
|
* Starts automatic periodic correlation worker for discovering new streams.
|