1
0
Fork 0
mirror of synced 2024-07-15 19:36:08 +12:00

push changes

This commit is contained in:
Everly Precia Suresh 2022-10-25 18:47:24 +00:00
parent de7fee6790
commit f055e15031

View file

@ -98,8 +98,10 @@ class DatabaseV1 extends Worker
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'available'));
} catch (\Throwable $th) {
Console::error($th->getMessage());
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'failed'));
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('error', $th->getMessage()));
$dbForProject->updateDocument('attributes', $attribute->getId(),
$attribute
->setAttribute('status', 'failed')
->setAttribute('error', $th->getMessage()));
} finally {
$target = Realtime::fromPayload(
// Pass first, most verbose event pattern
@ -159,7 +161,11 @@ class DatabaseV1 extends Worker
$dbForProject->deleteDocument('attributes', $attribute->getId());
} catch (\Throwable $th) {
Console::error($th->getMessage());
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'stuck'));
$dbForProject->updateDocument('attributes', $attribute->getId(),
$attribute
->setAttribute('status', 'stuck')
->setAttribute('error', $th->getMessage())
);
} finally {
$target = Realtime::fromPayload(
// Pass first, most verbose event pattern
@ -269,7 +275,11 @@ class DatabaseV1 extends Worker
$dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'available'));
} catch (\Throwable $th) {
Console::error($th->getMessage());
$dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'failed'));
$dbForProject->updateDocument('indexes', $index->getId(),
$index
->setAttribute('status', 'failed')
->setAttribute('error', $th->getMessage())
);
} finally {
$target = Realtime::fromPayload(
// Pass first, most verbose event pattern
@ -322,7 +332,12 @@ class DatabaseV1 extends Worker
$dbForProject->deleteDocument('indexes', $index->getId());
} catch (\Throwable $th) {
Console::error($th->getMessage());
$dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'stuck'));
$dbForProject->updateDocument('indexes', $index->getId(),
$index
->setAttribute('status', 'stuck')
->setAttribute('error',$th->getMessage())
);
} finally {
$target = Realtime::fromPayload(
// Pass first, most verbose event pattern