@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.
@@ -6059,7 +6059,7 @@ var GraphSyncController = class _GraphSyncController {
6059
6059
  },
6060
6060
  { concurrency: 30 }
6061
6061
  ) : CadenzaService.getLocalCadenzaDBInsertTask("task"))?.then(
6062
- CadenzaService.createMetaTask("Record registration", (ctx) => {
6062
+ CadenzaService.createMetaTask("Record registration", (ctx, emit) => {
6063
6063
  if (!ctx.__syncing) {
6064
6064
  return;
6065
6065
  }
@@ -6067,6 +6067,10 @@ var GraphSyncController = class _GraphSyncController {
6067
6067
  delayMs: 3e3
6068
6068
  });
6069
6069
  CadenzaService.get(ctx.__taskName).registered = true;
6070
+ emit("meta.sync_controller.task_registered", {
6071
+ ...ctx,
6072
+ task: CadenzaService.get(ctx.__taskName)
6073
+ });
6070
6074
  return true;
6071
6075
  }).then(
6072
6076
  CadenzaService.createUniqueMetaTask(
@@ -6557,6 +6561,16 @@ var GraphSyncController = class _GraphSyncController {
6557
6561
  this.registerDeputyRelationshipTask
6558
6562
  );
6559
6563
  CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_intents").then(this.registerIntentToTaskMapTask);
6564
+ CadenzaService.createMetaTask("Get registered task for intent sync", (ctx) => {
6565
+ const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
6566
+ if (!task) {
6567
+ return false;
6568
+ }
6569
+ return {
6570
+ ...ctx,
6571
+ task
6572
+ };
6573
+ }).doOn("meta.sync_controller.task_registered").then(this.registerIntentToTaskMapTask);
6560
6574
  CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_actors").then(this.registerActorTaskMapTask);
6561
6575
  CadenzaService.registry.getAllRoutines.clone().doOn("meta.sync_controller.synced_routines").then(this.splitTasksInRoutines);
6562
6576
  CadenzaService.createMetaTask("Finish sync", (ctx, emit) => {