From e6333897074ab32dfdde147bfa98ce286784178f Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 15 Jun 2023 15:45:40 +0300 Subject: [PATCH] delete unnecessary project collections task --- .../Platform/Tasks/PatchDeleteProjectCollections.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Tasks/PatchDeleteProjectCollections.php b/src/Appwrite/Platform/Tasks/PatchDeleteProjectCollections.php index 903fec23f..a909e6859 100644 --- a/src/Appwrite/Platform/Tasks/PatchDeleteProjectCollections.php +++ b/src/Appwrite/Platform/Tasks/PatchDeleteProjectCollections.php @@ -34,16 +34,16 @@ class PatchDeleteProjectCollections extends Action $this ->desc('Delete unnecessary project collections') - ->param('pos', 0, new Numeric(), 'Resume deletion from param pos', true) + ->param('offset', 0, new Numeric(), 'Resume deletion from param pos', true) ->inject('pools') ->inject('cache') ->inject('dbForConsole') - ->callback(function (int $pos, Group $pools, Cache $cache, Database $dbForConsole) { - $this->action($pos, $pools, $cache, $dbForConsole); + ->callback(function (int $offset, Group $pools, Cache $cache, Database $dbForConsole) { + $this->action($offset, $pools, $cache, $dbForConsole); }); } - public function action(int $pos, Group $pools, Cache $cache, Database $dbForConsole): void + public function action(int $offset, Group $pools, Cache $cache, Database $dbForConsole): void { //docker compose exec -t appwrite patch-delete-project-collections @@ -62,7 +62,7 @@ class PatchDeleteProjectCollections extends Action $count = 0; $limit = 50; $sum = 50; - $offset = $pos; + $offset = $offset; while (!empty($projects)) { foreach ($projects as $project) {