Skip to content

Commit 767b4b2

Browse files
committed
Use helper
1 parent e07b198 commit 767b4b2

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/Database/Database.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,8 +2278,11 @@ protected function updateIndexMeta(string $collection, string $id, callable $upd
22782278

22792279
$collection->setAttribute('indexes', $indexes);
22802280

2281-
$this->withRetries(
2282-
fn () => $this->silent(fn () => $this->updateDocument(self::METADATA, $collection->getId(), $collection))
2281+
$this->updateMetadata(
2282+
collection: $collection,
2283+
rollbackOperation: null,
2284+
shouldRollback: false,
2285+
operationDescription: "index metadata update '{$id}'"
22832286
);
22842287

22852288
return $indexes[$index];
@@ -2316,8 +2319,11 @@ protected function updateAttributeMeta(string $collection, string $id, callable
23162319

23172320
$collection->setAttribute('attributes', $attributes);
23182321

2319-
$this->withRetries(
2320-
fn () => $this->silent(fn () => $this->updateDocument(self::METADATA, $collection->getId(), $collection))
2322+
$this->updateMetadata(
2323+
collection: $collection,
2324+
rollbackOperation: null,
2325+
shouldRollback: false,
2326+
operationDescription: "attribute metadata update '{$id}'"
23212327
);
23222328

23232329
try {

0 commit comments

Comments
 (0)