@cadenza.io/service 2.17.16 → 2.17.17

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/index.js CHANGED
@@ -8498,7 +8498,7 @@ var GraphSyncController = class _GraphSyncController {
8498
8498
  },
8499
8499
  { concurrency: 30 }
8500
8500
  ) : CadenzaService.getLocalCadenzaDBInsertTask("task"))?.then(
8501
- CadenzaService.createMetaTask("Record registration", (ctx) => {
8501
+ CadenzaService.createMetaTask("Record registration", (ctx, emit) => {
8502
8502
  if (!ctx.__syncing) {
8503
8503
  return;
8504
8504
  }
@@ -8506,6 +8506,10 @@ var GraphSyncController = class _GraphSyncController {
8506
8506
  delayMs: 3e3
8507
8507
  });
8508
8508
  CadenzaService.get(ctx.__taskName).registered = true;
8509
+ emit("meta.sync_controller.task_registered", {
8510
+ ...ctx,
8511
+ task: CadenzaService.get(ctx.__taskName)
8512
+ });
8509
8513
  return true;
8510
8514
  }).then(
8511
8515
  CadenzaService.createUniqueMetaTask(
@@ -8996,6 +9000,16 @@ var GraphSyncController = class _GraphSyncController {
8996
9000
  this.registerDeputyRelationshipTask
8997
9001
  );
8998
9002
  CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_intents").then(this.registerIntentToTaskMapTask);
9003
+ CadenzaService.createMetaTask("Get registered task for intent sync", (ctx) => {
9004
+ const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
9005
+ if (!task) {
9006
+ return false;
9007
+ }
9008
+ return {
9009
+ ...ctx,
9010
+ task
9011
+ };
9012
+ }).doOn("meta.sync_controller.task_registered").then(this.registerIntentToTaskMapTask);
8999
9013
  CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_actors").then(this.registerActorTaskMapTask);
9000
9014
  CadenzaService.registry.getAllRoutines.clone().doOn("meta.sync_controller.synced_routines").then(this.splitTasksInRoutines);
9001
9015
  CadenzaService.createMetaTask("Finish sync", (ctx, emit) => {