1
0
Fork 0
mirror of synced 2024-07-06 23:21:05 +12:00

Fix delete recursion

This commit is contained in:
Jake Barnby 2023-01-17 17:31:14 +13:00
parent 004bb82688
commit 536d36be7d
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -258,11 +258,8 @@ class DeletesV1 extends Worker
// Delete project tables
$dbForProject = $this->getProjectDB($projectId, $document);
$limit = 50;
$offset = 0;
while (true) {
$collections = $dbForProject->listCollections($limit, $offset);
$collections = $dbForProject->listCollections();
if (empty($collections)) {
break;
@ -271,8 +268,6 @@ class DeletesV1 extends Worker
foreach ($collections as $collection) {
$dbForProject->deleteCollection($collection->getId());
}
$offset += $limit;
}
// Delete metadata tables