@cadenza.io/service 2.17.46 → 2.17.47
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/browser/index.js +21 -10
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +21 -10
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.js +21 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8829,6 +8829,7 @@ var AUTHORITY_QUERY_RESULT_KEYS = {
|
|
|
8829
8829
|
signal_registry: "signalRegistrys",
|
|
8830
8830
|
intent_registry: "intentRegistrys"
|
|
8831
8831
|
};
|
|
8832
|
+
var EARLY_SYNC_REQUEST_DELAYS_MS = [2e3, 1e4, 3e4];
|
|
8832
8833
|
function resolveSyncQueryRows(ctx, tableName) {
|
|
8833
8834
|
const resultKey = AUTHORITY_QUERY_RESULT_KEYS[tableName];
|
|
8834
8835
|
const rows = ctx?.[resultKey];
|
|
@@ -10085,11 +10086,13 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10085
10086
|
).doOn(...authoritativeRegistrationTriggers).then(authoritativeIntentReconciliationGraph);
|
|
10086
10087
|
CadenzaService.signalBroker.getSignalsTask.clone().doOn(
|
|
10087
10088
|
"meta.sync_controller.sync_tick",
|
|
10088
|
-
"meta.service_registry.initial_sync_complete"
|
|
10089
|
+
"meta.service_registry.initial_sync_complete",
|
|
10090
|
+
"meta.sync_requested"
|
|
10089
10091
|
).then(this.splitSignalsTask);
|
|
10090
10092
|
CadenzaService.registry.getAllTasks.clone().doOn(
|
|
10091
10093
|
"meta.sync_controller.sync_tick",
|
|
10092
|
-
"meta.sync_controller.synced_signals"
|
|
10094
|
+
"meta.sync_controller.synced_signals",
|
|
10095
|
+
"meta.sync_requested"
|
|
10093
10096
|
).then(this.splitTasksForRegistration);
|
|
10094
10097
|
CadenzaService.createMetaTask("Get all intents", (ctx) => {
|
|
10095
10098
|
return {
|
|
@@ -10098,11 +10101,13 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10098
10101
|
};
|
|
10099
10102
|
}).doOn(
|
|
10100
10103
|
"meta.sync_controller.sync_tick",
|
|
10101
|
-
"meta.service_registry.initial_sync_complete"
|
|
10104
|
+
"meta.service_registry.initial_sync_complete",
|
|
10105
|
+
"meta.sync_requested"
|
|
10102
10106
|
).then(this.splitIntentsTask);
|
|
10103
10107
|
CadenzaService.registry.getAllRoutines.clone().doOn(
|
|
10104
10108
|
"meta.sync_controller.sync_tick",
|
|
10105
|
-
"meta.service_registry.initial_sync_complete"
|
|
10109
|
+
"meta.service_registry.initial_sync_complete",
|
|
10110
|
+
"meta.sync_requested"
|
|
10106
10111
|
).then(this.splitRoutinesTask);
|
|
10107
10112
|
CadenzaService.createMetaTask("Get all actors", (ctx) => {
|
|
10108
10113
|
return {
|
|
@@ -10111,7 +10116,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10111
10116
|
};
|
|
10112
10117
|
}).doOn(
|
|
10113
10118
|
"meta.sync_controller.sync_tick",
|
|
10114
|
-
"meta.service_registry.initial_sync_complete"
|
|
10119
|
+
"meta.service_registry.initial_sync_complete",
|
|
10120
|
+
"meta.sync_requested"
|
|
10115
10121
|
).then(this.splitActorsForRegistration);
|
|
10116
10122
|
CadenzaService.createMetaTask("Get registered task for task graph sync", (ctx) => {
|
|
10117
10123
|
const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
|
|
@@ -10128,7 +10134,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10128
10134
|
);
|
|
10129
10135
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
10130
10136
|
"meta.sync_controller.synced_signals",
|
|
10131
|
-
"meta.sync_controller.synced_tasks"
|
|
10137
|
+
"meta.sync_controller.synced_tasks",
|
|
10138
|
+
"meta.sync_requested"
|
|
10132
10139
|
).then(
|
|
10133
10140
|
CadenzaService.createMetaTask(
|
|
10134
10141
|
"Ensure signal and task sync ready",
|
|
@@ -10162,7 +10169,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10162
10169
|
);
|
|
10163
10170
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
10164
10171
|
"meta.sync_controller.synced_intents",
|
|
10165
|
-
"meta.sync_controller.synced_tasks"
|
|
10172
|
+
"meta.sync_controller.synced_tasks",
|
|
10173
|
+
"meta.sync_requested"
|
|
10166
10174
|
).then(
|
|
10167
10175
|
CadenzaService.createMetaTask(
|
|
10168
10176
|
"Ensure intent and task sync ready",
|
|
@@ -10196,7 +10204,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10196
10204
|
);
|
|
10197
10205
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
10198
10206
|
"meta.sync_controller.synced_actors",
|
|
10199
|
-
"meta.sync_controller.synced_tasks"
|
|
10207
|
+
"meta.sync_controller.synced_tasks",
|
|
10208
|
+
"meta.sync_requested"
|
|
10200
10209
|
).then(this.registerActorTaskMapTask);
|
|
10201
10210
|
CadenzaService.createMetaTask("Get registered task for actor sync", (ctx) => {
|
|
10202
10211
|
const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
|
|
@@ -10221,7 +10230,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10221
10230
|
CadenzaService.registry.getAllRoutines.clone().doOn(
|
|
10222
10231
|
"meta.sync_controller.synced_routines",
|
|
10223
10232
|
"meta.sync_controller.synced_tasks",
|
|
10224
|
-
"meta.
|
|
10233
|
+
"meta.sync_requested"
|
|
10225
10234
|
).then(
|
|
10226
10235
|
CadenzaService.createMetaTask(
|
|
10227
10236
|
"Ensure routine and task sync ready",
|
|
@@ -10265,7 +10274,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10265
10274
|
{ __syncing: true },
|
|
10266
10275
|
250
|
|
10267
10276
|
);
|
|
10268
|
-
|
|
10277
|
+
for (const delayMs of EARLY_SYNC_REQUEST_DELAYS_MS) {
|
|
10278
|
+
CadenzaService.schedule("meta.sync_requested", { __syncing: true }, delayMs);
|
|
10279
|
+
}
|
|
10269
10280
|
}
|
|
10270
10281
|
}
|
|
10271
10282
|
};
|