Skip to content

Commit

Permalink
only bypass obsolete (and expensive) query
Browse files Browse the repository at this point in the history
The rest of the flow is still needed to finish triggering completion
events, until we refactor this more cleanly.
  • Loading branch information
hotzevzl committed Mar 7, 2024
1 parent c81be11 commit 70662ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,12 @@ export class MoveDataFromPreparationHandler
specificationId: command.specificationId,
});
});

this.eventBus.publish(
new DataMovedFormPreparationEvent(
command.scenarioId,
command.specificationId,
),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ export class ScenarioPlanningUnitsFeaturesAggregateProcessor
) {}

async process(job: Job<JobInput, true>): Promise<true> {
/**
* @debt Bypassing the original query, whose results are not needed anymore,
* and which was expensive to run. The flow that includes this processor
* should be cleaned up instead, to fully bypass
* ScenarioPlanningUnitsFeaturesAggregateProcessor.
*/
return true;
const scenarioId = job.data.scenarioId;
await this.entityManager.query(query, [scenarioId]);
return true;
Expand Down

0 comments on commit 70662ea

Please sign in to comment.