1
0
Fork 0
mirror of synced 2024-09-29 17:01:37 +13:00

Remove interface

This commit is contained in:
fogelito 2024-08-19 18:26:54 +03:00
parent 49b659a9ae
commit b47fd08f71

View file

@ -82,6 +82,9 @@ class Maintenance extends Action
protected function foreachProject(Database $dbForConsole, callable $callback): void
{
var_dump('shmuel 22');
// TODO: @Meldiron name of this method no longer matches. It does not delete, and it gives whole document
$count = 0;
$chunk = 0;
@ -90,13 +93,14 @@ class Maintenance extends Action
$executionStart = \microtime(true);
while ($sum === $limit) {
var_dump('shmuel 33');
$projects = $dbForConsole->find('projects', [Query::limit($limit), Query::offset($chunk * $limit)]);
$chunk++;
/** @var string[] $projectIds */
$sum = count($projects);
var_dump('shmuel 44');
foreach ($projects as $project) {
$callback($project);
$count++;