Merge pull request #7156 from appwrite/fix-orfaned-project-deleteion

comparison fix
This commit is contained in:
Christy Jacob
2023-11-16 13:40:46 -05:00
committed by GitHub
@@ -54,7 +54,7 @@ class DeleteOrphanedProjects extends Action
$totalProjects = $dbForConsole->count('projects');
Console::success("Found a total of: {$totalProjects} projects");
$orphans = 1;
$orphans = 0;
$cnt = 0;
$count = 0;
$limit = 30;
@@ -90,7 +90,7 @@ class DeleteOrphanedProjects extends Action
/**
* +2 = audit+abuse
*/
if ($collectionsCreated === (count($collectionsConfig) + 2)) {
if ($collectionsCreated >= (count($collectionsConfig) + 2)) {
Console::log($msg . ' ignoring....');
continue;
}
@@ -135,6 +135,6 @@ class DeleteOrphanedProjects extends Action
$count = $count + $sum;
}
Console::log('Iterated through ' . $count - 1 . '/' . $totalProjects . ' projects found ' . $orphans - 1 . ' orphans');
Console::log('Iterated through ' . $count - 1 . '/' . $totalProjects . ' projects found ' . $orphans . ' orphans');
}
}