From 7abd6bab8baae12fd7b3d2f537857aa5d02524b6 Mon Sep 17 00:00:00 2001 From: SebClem Date: Fri, 12 Jul 2024 14:32:36 +0200 Subject: [PATCH] Add start addon in orchestrator --- nextcloud_backup/backend/src/services/orchestrator.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nextcloud_backup/backend/src/services/orchestrator.ts b/nextcloud_backup/backend/src/services/orchestrator.ts index ed2806a..c5ad99d 100644 --- a/nextcloud_backup/backend/src/services/orchestrator.ts +++ b/nextcloud_backup/backend/src/services/orchestrator.ts @@ -84,6 +84,9 @@ export function doBackupWorkflow(type: WorkflowType) { ); } }) + .then(() => { + return homeAssistantService.startAddons(addonsToStartStop); + }) .then(() => { logger.info("Backup workflow finished successfully !"); messageManager.info("Backup workflow finished successfully !"); @@ -104,8 +107,7 @@ export function doBackupWorkflow(type: WorkflowType) { // This methods remove addon that are no installed in HA from the conf array function sanitizeAddonList(addonInConf: string[], addonInHA: AddonModel[]) { - addonInConf.filter((value) => addonInHA.some((v) => v.slug == value)); - return addonInConf; + return addonInConf.filter((value) => addonInHA.some((v) => v.slug == value)); } function getAddonToBackup(excludedAddon: string[], addonInHA: AddonModel[]) {