refactor: decompose backend services and routes for maintainability

This commit is contained in:
Daniel Volz
2026-03-27 06:48:20 +01:00
committed by GitHub
parent 73a235dd83
commit b58c4fe5bb
32 changed files with 1527 additions and 1310 deletions
+12 -2
View File
@@ -1125,10 +1125,20 @@ export function startMedicationEnrichmentService(logger: MedicationEnrichmentLog
if (schedulerStarted) return;
schedulerStarted = true;
void refreshEmaCatalog("startup").catch(() => undefined);
void refreshEmaCatalog("startup").catch((error: unknown) => {
activeLogger.error(
`[MedicationEnrichment] startup refresh failed: ${error instanceof Error ? error.message : String(error)}`
);
return undefined;
});
refreshTimer = setInterval(() => {
void refreshEmaCatalog("scheduled").catch(() => undefined);
void refreshEmaCatalog("scheduled").catch((error: unknown) => {
activeLogger.error(
`[MedicationEnrichment] scheduled refresh failed: ${error instanceof Error ? error.message : String(error)}`
);
return undefined;
});
}, EMA_REFRESH_INTERVAL_MS);
if (typeof refreshTimer.unref === "function") {