mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Remove code from worker
This commit is contained in:
parent
0afbfe2f84
commit
1b4a96b1fb
1 changed files with 2 additions and 9 deletions
|
|
@ -11,7 +11,6 @@ use Utopia\Database\Document;
|
|||
use Utopia\Database\Exception as DatabaseException;
|
||||
use Utopia\Database\Exception\Authorization;
|
||||
use Utopia\Database\Exception\Conflict;
|
||||
use Utopia\Database\Exception\Dependency;
|
||||
use Utopia\Database\Exception\NotFound;
|
||||
use Utopia\Database\Exception\Restricted;
|
||||
use Utopia\Database\Exception\Structure;
|
||||
|
|
@ -293,18 +292,16 @@ class Databases extends Action
|
|||
|
||||
if ($e instanceof DatabaseException) {
|
||||
$attribute->setAttribute('error', $e->getMessage());
|
||||
if (! $relatedAttribute->isEmpty()) {
|
||||
if (!$relatedAttribute->isEmpty()) {
|
||||
$relatedAttribute->setAttribute('error', $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
$dbForProject->updateDocument(
|
||||
'attributes',
|
||||
$attribute->getId(),
|
||||
$attribute->setAttribute('status', 'stuck')
|
||||
);
|
||||
|
||||
if (! $relatedAttribute->isEmpty()) {
|
||||
if (!$relatedAttribute->isEmpty()) {
|
||||
$dbForProject->updateDocument(
|
||||
'attributes',
|
||||
$relatedAttribute->getId(),
|
||||
|
|
@ -312,10 +309,6 @@ class Databases extends Action
|
|||
);
|
||||
}
|
||||
|
||||
if ($e instanceof Dependency) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw $e;
|
||||
} finally {
|
||||
$this->trigger($database, $collection, $attribute, $project, $projectId, $events);
|
||||
|
|
|
|||
Loading…
Reference in a new issue