@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.mjs CHANGED
@@ -8447,7 +8447,7 @@ var GraphSyncController = class _GraphSyncController {
8447
8447
  },
8448
8448
  { concurrency: 30 }
8449
8449
  ) : CadenzaService.getLocalCadenzaDBInsertTask("task"))?.then(
8450
- CadenzaService.createMetaTask("Record registration", (ctx) => {
8450
+ CadenzaService.createMetaTask("Record registration", (ctx, emit) => {
8451
8451
  if (!ctx.__syncing) {
8452
8452
  return;
8453
8453
  }
@@ -8455,6 +8455,10 @@ var GraphSyncController = class _GraphSyncController {
8455
8455
  delayMs: 3e3
8456
8456
  });
8457
8457
  CadenzaService.get(ctx.__taskName).registered = true;
8458
+ emit("meta.sync_controller.task_registered", {
8459
+ ...ctx,
8460
+ task: CadenzaService.get(ctx.__taskName)
8461
+ });
8458
8462
  return true;
8459
8463
  }).then(
8460
8464
  CadenzaService.createUniqueMetaTask(
@@ -8945,6 +8949,16 @@ var GraphSyncController = class _GraphSyncController {
8945
8949
  this.registerDeputyRelationshipTask
8946
8950
  );
8947
8951
  CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_intents").then(this.registerIntentToTaskMapTask);
8952
+ CadenzaService.createMetaTask("Get registered task for intent sync", (ctx) => {
8953
+ const task = ctx.task ?? (ctx.__taskName ? CadenzaService.get(ctx.__taskName) : void 0);
8954
+ if (!task) {
8955
+ return false;
8956
+ }
8957
+ return {
8958
+ ...ctx,
8959
+ task
8960
+ };
8961
+ }).doOn("meta.sync_controller.task_registered").then(this.registerIntentToTaskMapTask);
8948
8962
  CadenzaService.registry.doForEachTask.clone().doOn("meta.sync_controller.synced_tasks", "meta.sync_controller.synced_actors").then(this.registerActorTaskMapTask);
8949
8963
  CadenzaService.registry.getAllRoutines.clone().doOn("meta.sync_controller.synced_routines").then(this.splitTasksInRoutines);
8950
8964
  CadenzaService.createMetaTask("Finish sync", (ctx, emit) => {