@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.mjs
CHANGED
|
@@ -6316,6 +6316,7 @@ var AUTHORITY_QUERY_RESULT_KEYS = {
|
|
|
6316
6316
|
signal_registry: "signalRegistrys",
|
|
6317
6317
|
intent_registry: "intentRegistrys"
|
|
6318
6318
|
};
|
|
6319
|
+
var EARLY_SYNC_REQUEST_DELAYS_MS = [2e3, 1e4, 3e4];
|
|
6319
6320
|
function resolveSyncQueryRows(ctx, tableName) {
|
|
6320
6321
|
const resultKey = AUTHORITY_QUERY_RESULT_KEYS[tableName];
|
|
6321
6322
|
const rows = ctx?.[resultKey];
|
|
@@ -7572,11 +7573,13 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7572
7573
|
).doOn(...authoritativeRegistrationTriggers).then(authoritativeIntentReconciliationGraph);
|
|
7573
7574
|
CadenzaService.signalBroker.getSignalsTask.clone().doOn(
|
|
7574
7575
|
"meta.sync_controller.sync_tick",
|
|
7575
|
-
"meta.service_registry.initial_sync_complete"
|
|
7576
|
+
"meta.service_registry.initial_sync_complete",
|
|
7577
|
+
"meta.sync_requested"
|
|
7576
7578
|
).then(this.splitSignalsTask);
|
|
7577
7579
|
CadenzaService.registry.getAllTasks.clone().doOn(
|
|
7578
7580
|
"meta.sync_controller.sync_tick",
|
|
7579
|
-
"meta.sync_controller.synced_signals"
|
|
7581
|
+
"meta.sync_controller.synced_signals",
|
|
7582
|
+
"meta.sync_requested"
|
|
7580
7583
|
).then(this.splitTasksForRegistration);
|
|
7581
7584
|
CadenzaService.createMetaTask("Get all intents", (ctx) => {
|
|
7582
7585
|
return {
|
|
@@ -7585,11 +7588,13 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7585
7588
|
};
|
|
7586
7589
|
}).doOn(
|
|
7587
7590
|
"meta.sync_controller.sync_tick",
|
|
7588
|
-
"meta.service_registry.initial_sync_complete"
|
|
7591
|
+
"meta.service_registry.initial_sync_complete",
|
|
7592
|
+
"meta.sync_requested"
|
|
7589
7593
|
).then(this.splitIntentsTask);
|
|
7590
7594
|
CadenzaService.registry.getAllRoutines.clone().doOn(
|
|
7591
7595
|
"meta.sync_controller.sync_tick",
|
|
7592
|
-
"meta.service_registry.initial_sync_complete"
|
|
7596
|
+
"meta.service_registry.initial_sync_complete",
|
|
7597
|
+
"meta.sync_requested"
|
|
7593
7598
|
).then(this.splitRoutinesTask);
|
|
7594
7599
|
CadenzaService.createMetaTask("Get all actors", (ctx) => {
|
|
7595
7600
|
return {
|
|
@@ -7598,7 +7603,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7598
7603
|
};
|
|
7599
7604
|
}).doOn(
|
|
7600
7605
|
"meta.sync_controller.sync_tick",
|
|
7601
|
-
"meta.service_registry.initial_sync_complete"
|
|
7606
|
+
"meta.service_registry.initial_sync_complete",
|
|
7607
|
+
"meta.sync_requested"
|
|
7602
7608
|
).then(this.splitActorsForRegistration);
|
|
7603
7609
|
CadenzaService.createMetaTask("Get registered task for task graph sync", (ctx) => {
|
|
7604
7610
|
const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
|
|
@@ -7615,7 +7621,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7615
7621
|
);
|
|
7616
7622
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
7617
7623
|
"meta.sync_controller.synced_signals",
|
|
7618
|
-
"meta.sync_controller.synced_tasks"
|
|
7624
|
+
"meta.sync_controller.synced_tasks",
|
|
7625
|
+
"meta.sync_requested"
|
|
7619
7626
|
).then(
|
|
7620
7627
|
CadenzaService.createMetaTask(
|
|
7621
7628
|
"Ensure signal and task sync ready",
|
|
@@ -7649,7 +7656,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7649
7656
|
);
|
|
7650
7657
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
7651
7658
|
"meta.sync_controller.synced_intents",
|
|
7652
|
-
"meta.sync_controller.synced_tasks"
|
|
7659
|
+
"meta.sync_controller.synced_tasks",
|
|
7660
|
+
"meta.sync_requested"
|
|
7653
7661
|
).then(
|
|
7654
7662
|
CadenzaService.createMetaTask(
|
|
7655
7663
|
"Ensure intent and task sync ready",
|
|
@@ -7683,7 +7691,8 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7683
7691
|
);
|
|
7684
7692
|
CadenzaService.registry.doForEachTask.clone().doOn(
|
|
7685
7693
|
"meta.sync_controller.synced_actors",
|
|
7686
|
-
"meta.sync_controller.synced_tasks"
|
|
7694
|
+
"meta.sync_controller.synced_tasks",
|
|
7695
|
+
"meta.sync_requested"
|
|
7687
7696
|
).then(this.registerActorTaskMapTask);
|
|
7688
7697
|
CadenzaService.createMetaTask("Get registered task for actor sync", (ctx) => {
|
|
7689
7698
|
const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
|
|
@@ -7708,7 +7717,7 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7708
7717
|
CadenzaService.registry.getAllRoutines.clone().doOn(
|
|
7709
7718
|
"meta.sync_controller.synced_routines",
|
|
7710
7719
|
"meta.sync_controller.synced_tasks",
|
|
7711
|
-
"meta.
|
|
7720
|
+
"meta.sync_requested"
|
|
7712
7721
|
).then(
|
|
7713
7722
|
CadenzaService.createMetaTask(
|
|
7714
7723
|
"Ensure routine and task sync ready",
|
|
@@ -7752,7 +7761,9 @@ var GraphSyncController = class _GraphSyncController {
|
|
|
7752
7761
|
{ __syncing: true },
|
|
7753
7762
|
250
|
|
7754
7763
|
);
|
|
7755
|
-
|
|
7764
|
+
for (const delayMs of EARLY_SYNC_REQUEST_DELAYS_MS) {
|
|
7765
|
+
CadenzaService.schedule("meta.sync_requested", { __syncing: true }, delayMs);
|
|
7766
|
+
}
|
|
7756
7767
|
}
|
|
7757
7768
|
}
|
|
7758
7769
|
};
|