@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.mjs
CHANGED
|
@@ -8780,6 +8780,7 @@ var AUTHORITY_QUERY_RESULT_KEYS = {
|
|
|
8780
8780
|
signal_registry: "signalRegistrys",
|
|
8781
8781
|
intent_registry: "intentRegistrys"
|
|
8782
8782
|
};
|
|
8783
|
+
var EARLY_SYNC_REQUEST_DELAYS_MS = [2e3, 1e4, 3e4];
|
|
8783
8784
|
function resolveSyncQueryRows(ctx, tableName) {
|
|
8784
8785
|
const resultKey = AUTHORITY_QUERY_RESULT_KEYS[tableName];
|
|
8785
8786
|
const rows = ctx?.[resultKey];
|
|
@@ -10036,11 +10037,13 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10036
10037
|
).doOn(...authoritativeRegistrationTriggers).then(authoritativeIntentReconciliationGraph);
|
|
10037
10038
|
CadenzaService.signalBroker.getSignalsTask.clone().doOn(
|
|
10038
10039
|
"meta.sync_controller.sync_tick",
|
|
10039
|
-
"meta.service_registry.initial_sync_complete"
|
|
10040
|
+
"meta.service_registry.initial_sync_complete",
|
|
10041
|
+
"meta.sync_requested"
|
|
10040
10042
|
).then(this.splitSignalsTask);
|
|
10041
10043
|
CadenzaService.registry.getAllTasks.clone().doOn(
|
|
10042
10044
|
"meta.sync_controller.sync_tick",
|
|
10043
|
-
"meta.sync_controller.synced_signals"
|
|
10045
|
+
"meta.sync_controller.synced_signals",
|
|
10046
|
+
"meta.sync_requested"
|
|
10044
10047
|
).then(this.splitTasksForRegistration);
|
|
10045
10048
|
CadenzaService.createMetaTask("Get all intents", (ctx) => {
|
|
10046
10049
|
return {
|
|
@@ -10049,11 +10052,13 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10049
10052
|
};
|
|
10050
10053
|
}).doOn(
|
|
10051
10054
|
"meta.sync_controller.sync_tick",
|
|
10052
|
-
"meta.service_registry.initial_sync_complete"
|
|
10055
|
+
"meta.service_registry.initial_sync_complete",
|
|
10056
|
+
"meta.sync_requested"
|
|
10053
10057
|
).then(this.splitIntentsTask);
|
|
10054
10058
|
CadenzaService.registry.getAllRoutines.clone().doOn(
|
|
10055
10059
|
"meta.sync_controller.sync_tick",
|
|
10056
|
-
"meta.service_registry.initial_sync_complete"
|
|
10060
|
+
"meta.service_registry.initial_sync_complete",
|
|
10061
|
+
"meta.sync_requested"
|
|
10057
10062
|
).then(this.splitRoutinesTask);
|
|
10058
10063
|
CadenzaService.createMetaTask("Get all actors", (ctx) => {
|
|
10059
10064
|
return {
|
|
@@ -10062,7 +10067,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10062
10067
|
};
|
|
10063
10068
|
}).doOn(
|
|
10064
10069
|
"meta.sync_controller.sync_tick",
|
|
10065
|
-
"meta.service_registry.initial_sync_complete"
|
|
10070
|
+
"meta.service_registry.initial_sync_complete",
|
|
10071
|
+
"meta.sync_requested"
|
|
10066
10072
|
).then(this.splitActorsForRegistration);
|
|
10067
10073
|
CadenzaService.createMetaTask("Get registered task for task graph sync", (ctx) => {
|
|
10068
10074
|
const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
|
|
@@ -10079,7 +10085,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10079
10085
|
);
|
|
10080
10086
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
10081
10087
|
"meta.sync_controller.synced_signals",
|
|
10082
|
-
"meta.sync_controller.synced_tasks"
|
|
10088
|
+
"meta.sync_controller.synced_tasks",
|
|
10089
|
+
"meta.sync_requested"
|
|
10083
10090
|
).then(
|
|
10084
10091
|
CadenzaService.createMetaTask(
|
|
10085
10092
|
"Ensure signal and task sync ready",
|
|
@@ -10113,7 +10120,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10113
10120
|
);
|
|
10114
10121
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
10115
10122
|
"meta.sync_controller.synced_intents",
|
|
10116
|
-
"meta.sync_controller.synced_tasks"
|
|
10123
|
+
"meta.sync_controller.synced_tasks",
|
|
10124
|
+
"meta.sync_requested"
|
|
10117
10125
|
).then(
|
|
10118
10126
|
CadenzaService.createMetaTask(
|
|
10119
10127
|
"Ensure intent and task sync ready",
|
|
@@ -10147,7 +10155,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10147
10155
|
);
|
|
10148
10156
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
10149
10157
|
"meta.sync_controller.synced_actors",
|
|
10150
|
-
"meta.sync_controller.synced_tasks"
|
|
10158
|
+
"meta.sync_controller.synced_tasks",
|
|
10159
|
+
"meta.sync_requested"
|
|
10151
10160
|
).then(this.registerActorTaskMapTask);
|
|
10152
10161
|
CadenzaService.createMetaTask("Get registered task for actor sync", (ctx) => {
|
|
10153
10162
|
const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
|
|
@@ -10172,7 +10181,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10172
10181
|
CadenzaService.registry.getAllRoutines.clone().doOn(
|
|
10173
10182
|
"meta.sync_controller.synced_routines",
|
|
10174
10183
|
"meta.sync_controller.synced_tasks",
|
|
10175
|
-
"meta.
|
|
10184
|
+
"meta.sync_requested"
|
|
10176
10185
|
).then(
|
|
10177
10186
|
CadenzaService.createMetaTask(
|
|
10178
10187
|
"Ensure routine and task sync ready",
|
|
@@ -10216,7 +10225,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
10216
10225
|
{ __syncing: true },
|
|
10217
10226
|
250
|
|
10218
10227
|
);
|
|
10219
|
-
|
|
10228
|
+
for (const delayMs of EARLY_SYNC_REQUEST_DELAYS_MS) {
|
|
10229
|
+
CadenzaService.schedule("meta.sync_requested", { __syncing: true }, delayMs);
|
|
10230
|
+
}
|
|
10220
10231
|
}
|
|
10221
10232
|
}
|
|
10222
10233
|
};
|