@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/browser/index.js
CHANGED
|
@@ -6365,6 +6365,7 @@ var AUTHORITY_QUERY_RESULT_KEYS = {
|
|
|
6365
6365
|
signal_registry: "signalRegistrys",
|
|
6366
6366
|
intent_registry: "intentRegistrys"
|
|
6367
6367
|
};
|
|
6368
|
+
var EARLY_SYNC_REQUEST_DELAYS_MS = [2e3, 1e4, 3e4];
|
|
6368
6369
|
function resolveSyncQueryRows(ctx, tableName) {
|
|
6369
6370
|
const resultKey = AUTHORITY_QUERY_RESULT_KEYS[tableName];
|
|
6370
6371
|
const rows = ctx?.[resultKey];
|
|
@@ -7621,11 +7622,13 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7621
7622
|
).doOn(...authoritativeRegistrationTriggers).then(authoritativeIntentReconciliationGraph);
|
|
7622
7623
|
CadenzaService.signalBroker.getSignalsTask.clone().doOn(
|
|
7623
7624
|
"meta.sync_controller.sync_tick",
|
|
7624
|
-
"meta.service_registry.initial_sync_complete"
|
|
7625
|
+
"meta.service_registry.initial_sync_complete",
|
|
7626
|
+
"meta.sync_requested"
|
|
7625
7627
|
).then(this.splitSignalsTask);
|
|
7626
7628
|
CadenzaService.registry.getAllTasks.clone().doOn(
|
|
7627
7629
|
"meta.sync_controller.sync_tick",
|
|
7628
|
-
"meta.sync_controller.synced_signals"
|
|
7630
|
+
"meta.sync_controller.synced_signals",
|
|
7631
|
+
"meta.sync_requested"
|
|
7629
7632
|
).then(this.splitTasksForRegistration);
|
|
7630
7633
|
CadenzaService.createMetaTask("Get all intents", (ctx) => {
|
|
7631
7634
|
return {
|
|
@@ -7634,11 +7637,13 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7634
7637
|
};
|
|
7635
7638
|
}).doOn(
|
|
7636
7639
|
"meta.sync_controller.sync_tick",
|
|
7637
|
-
"meta.service_registry.initial_sync_complete"
|
|
7640
|
+
"meta.service_registry.initial_sync_complete",
|
|
7641
|
+
"meta.sync_requested"
|
|
7638
7642
|
).then(this.splitIntentsTask);
|
|
7639
7643
|
CadenzaService.registry.getAllRoutines.clone().doOn(
|
|
7640
7644
|
"meta.sync_controller.sync_tick",
|
|
7641
|
-
"meta.service_registry.initial_sync_complete"
|
|
7645
|
+
"meta.service_registry.initial_sync_complete",
|
|
7646
|
+
"meta.sync_requested"
|
|
7642
7647
|
).then(this.splitRoutinesTask);
|
|
7643
7648
|
CadenzaService.createMetaTask("Get all actors", (ctx) => {
|
|
7644
7649
|
return {
|
|
@@ -7647,7 +7652,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7647
7652
|
};
|
|
7648
7653
|
}).doOn(
|
|
7649
7654
|
"meta.sync_controller.sync_tick",
|
|
7650
|
-
"meta.service_registry.initial_sync_complete"
|
|
7655
|
+
"meta.service_registry.initial_sync_complete",
|
|
7656
|
+
"meta.sync_requested"
|
|
7651
7657
|
).then(this.splitActorsForRegistration);
|
|
7652
7658
|
CadenzaService.createMetaTask("Get registered task for task graph sync", (ctx) => {
|
|
7653
7659
|
const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
|
|
@@ -7664,7 +7670,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7664
7670
|
);
|
|
7665
7671
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
7666
7672
|
"meta.sync_controller.synced_signals",
|
|
7667
|
-
"meta.sync_controller.synced_tasks"
|
|
7673
|
+
"meta.sync_controller.synced_tasks",
|
|
7674
|
+
"meta.sync_requested"
|
|
7668
7675
|
).then(
|
|
7669
7676
|
CadenzaService.createMetaTask(
|
|
7670
7677
|
"Ensure signal and task sync ready",
|
|
@@ -7698,7 +7705,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7698
7705
|
);
|
|
7699
7706
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
7700
7707
|
"meta.sync_controller.synced_intents",
|
|
7701
|
-
"meta.sync_controller.synced_tasks"
|
|
7708
|
+
"meta.sync_controller.synced_tasks",
|
|
7709
|
+
"meta.sync_requested"
|
|
7702
7710
|
).then(
|
|
7703
7711
|
CadenzaService.createMetaTask(
|
|
7704
7712
|
"Ensure intent and task sync ready",
|
|
@@ -7732,7 +7740,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7732
7740
|
);
|
|
7733
7741
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
7734
7742
|
"meta.sync_controller.synced_actors",
|
|
7735
|
-
"meta.sync_controller.synced_tasks"
|
|
7743
|
+
"meta.sync_controller.synced_tasks",
|
|
7744
|
+
"meta.sync_requested"
|
|
7736
7745
|
).then(this.registerActorTaskMapTask);
|
|
7737
7746
|
CadenzaService.createMetaTask("Get registered task for actor sync", (ctx) => {
|
|
7738
7747
|
const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
|
|
@@ -7757,7 +7766,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7757
7766
|
CadenzaService.registry.getAllRoutines.clone().doOn(
|
|
7758
7767
|
"meta.sync_controller.synced_routines",
|
|
7759
7768
|
"meta.sync_controller.synced_tasks",
|
|
7760
|
-
"meta.
|
|
7769
|
+
"meta.sync_requested"
|
|
7761
7770
|
).then(
|
|
7762
7771
|
CadenzaService.createMetaTask(
|
|
7763
7772
|
"Ensure routine and task sync ready",
|
|
@@ -7801,7 +7810,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7801
7810
|
{ __syncing: true },
|
|
7802
7811
|
250
|
|
7803
7812
|
);
|
|
7804
|
-
|
|
7813
|
+
for (const delayMs of EARLY_SYNC_REQUEST_DELAYS_MS) {
|
|
7814
|
+
CadenzaService.schedule("meta.sync_requested", { __syncing: true }, delayMs);
|
|
7815
|
+
}
|
|
7805
7816
|
}
|
|
7806
7817
|
}
|
|
7807
7818
|
};
|