mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix: delete schedule document if project is deleted as well
This commit is contained in:
1 parent
b4ce4c7837
commit
05f314e88c
2 files changed
+15
-14
No files matched your search
@@ -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'));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user