@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.
@@ -6008,7 +6008,7 @@ var GraphSyncController = class _GraphSyncController {
6008
6008
  },
6009
6009
  { concurrency: 30 }
6010
6010
  ) : CadenzaService.getLocalCadenzaDBInsertTask("task"))?.then(
6011
- CadenzaService.createMetaTask("Record registration", (ctx) => {
6011
+ CadenzaService.createMetaTask("Record registration", (ctx, emit) => {
6012
6012
  if (!ctx.__syncing) {
6013
6013
  return;
6014
6014
  }
@@ -6016,6 +6016,10 @@ var GraphSyncController = class _GraphSyncController {
6016
6016
  delayMs: 3e3
6017
6017
  });
6018
6018
  CadenzaService.get(ctx.__taskName).registered = true;
6019
+ emit("meta.sync_controller.task_registered", {
6020
+ ...ctx,
6021
+ task: CadenzaService.get(ctx.__taskName)
6022
+ });
6019
6023
  return true;
6020
6024
  }).then(
6021
6025
  CadenzaService.createUniqueMetaTask(
@@ -6506,6 +6510,16 @@ var GraphSyncController = class _GraphSyncController {
6506
6510
  this.registerDeputyRelationshipTask
6507
6511
  );
6508
6512
  CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_intents").then(this.registerIntentToTaskMapTask);
6513
+ CadenzaService.createMetaTask("Get registered task for intent sync", (ctx) => {
6514
+ const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
6515
+ if (!task) {
6516
+ return false;
6517
+ }
6518
+ return {
6519
+ ...ctx,
6520
+ task
6521
+ };
6522
+ }).doOn("meta.sync_controller.task_registered").then(this.registerIntentToTaskMapTask);
6509
6523
  CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_actors").then(this.registerActorTaskMapTask);
6510
6524
  CadenzaService.registry.getAllRoutines.clone().doOn("meta.sync_controller.synced_routines").then(this.splitTasksInRoutines);
6511
6525
  CadenzaService.createMetaTask("Finish sync", (ctx, emit) => {