delete unnecessary project collections task
This commit is contained in:
parent
428e9e73fe
commit
e633389707
1 changed files with 5 additions and 5 deletions
|
@ -34,16 +34,16 @@ class PatchDeleteProjectCollections extends Action
|
||||||
|
|
||||||
$this
|
$this
|
||||||
->desc('Delete unnecessary project collections')
|
->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('pools')
|
||||||
->inject('cache')
|
->inject('cache')
|
||||||
->inject('dbForConsole')
|
->inject('dbForConsole')
|
||||||
->callback(function (int $pos, Group $pools, Cache $cache, Database $dbForConsole) {
|
->callback(function (int $offset, Group $pools, Cache $cache, Database $dbForConsole) {
|
||||||
$this->action($pos, $pools, $cache, $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
|
//docker compose exec -t appwrite patch-delete-project-collections
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class PatchDeleteProjectCollections extends Action
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$limit = 50;
|
$limit = 50;
|
||||||
$sum = 50;
|
$sum = 50;
|
||||||
$offset = $pos;
|
$offset = $offset;
|
||||||
while (!empty($projects)) {
|
while (!empty($projects)) {
|
||||||
foreach ($projects as $project) {
|
foreach ($projects as $project) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue