Merge pull request #5839 from appwrite/fix-deletes-worker-loop
fix: delete schedule document if project is deleted as well
This commit is contained in:
commit
9fc46710c5
2 changed files with 15 additions and 14 deletions
|
@ -147,7 +147,8 @@ class DeletesV1 extends Worker
|
|||
$project = $this->getConsoleDB()->getDocument('projects', $document->getAttribute('projectId'));
|
||||
|
||||
if ($project->isEmpty()) {
|
||||
Console::warning('Unable to delete schedule for function ' . $document->getAttribute('resourceId'));
|
||||
$this->getConsoleDB()->deleteDocument('schedules', $document->getId());
|
||||
Console::success('Deleted schedule for deleted project ' . $document->getAttribute('projectId'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -155,7 +156,7 @@ class DeletesV1 extends Worker
|
|||
|
||||
if ($function->isEmpty()) {
|
||||
$this->getConsoleDB()->deleteDocument('schedules', $document->getId());
|
||||
Console::success('Deleting schedule for function ' . $document->getAttribute('resourceId'));
|
||||
Console::success('Deleted schedule for function ' . $document->getAttribute('resourceId'));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
24
composer.lock
generated
24
composer.lock
generated
|
@ -3253,16 +3253,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v4.15.5",
|
||||
"version": "v4.16.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
|
||||
"reference": "19526a33fb561ef417e822e85f08a00db4059c17"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
|
||||
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17",
|
||||
"reference": "19526a33fb561ef417e822e85f08a00db4059c17",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3303,9 +3303,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5"
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0"
|
||||
},
|
||||
"time": "2023-05-19T20:20:00+00:00"
|
||||
"time": "2023-06-25T14:52:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
|
@ -3656,16 +3656,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
"version": "1.22.0",
|
||||
"version": "1.22.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
||||
"reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c"
|
||||
"reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ec58baf7b3c7f1c81b3b00617c953249fb8cf30c",
|
||||
"reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0",
|
||||
"reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3697,9 +3697,9 @@
|
|||
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.0"
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1"
|
||||
},
|
||||
"time": "2023-06-01T12:35:21+00:00"
|
||||
"time": "2023-06-29T20:46:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
|
|
Loading…
Reference in a new issue