From f0e603431c50a4cd218537129d7584b06fd2c3f8 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[]) {