From 4f9339a82902d3e09e424c08c8be18961c9d9378 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Fri, 17 May 2024 13:46:47 +0900 Subject: [PATCH] Update report function to only count active functions --- src/Migration/Sources/Appwrite.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index a7f4a6a..16fa9a5 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -237,7 +237,9 @@ public function report(array $resources = []): array $report[Resource::TYPE_DEPLOYMENT] = 0; $functions = $functionsClient->list()['functions']; foreach ($functions as $function) { - $report[Resource::TYPE_DEPLOYMENT] += $functionsClient->listDeployments($function['$id'], [Query::limit(1)])['total']; + if (!empty($function['deployment'])) { + $report[Resource::TYPE_DEPLOYMENT] += 1; + } } }