Skip to content

Commit

Permalink
Update report function to only count active functions
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed May 17, 2024
1 parent 97c53be commit 4f9339a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Migration/Sources/Appwrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 4f9339a

Please sign in to comment.