Skip to content

Commit

Permalink
Merge pull request #31 from utopia-php/fix-deployment-reporting
Browse files Browse the repository at this point in the history
Update deployment report function to only count active deployments
  • Loading branch information
abnegate authored May 17, 2024
2 parents 426306b + 5ed6224 commit a8a5d39
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 a8a5d39

Please sign in to comment.