Fix realtime deletes
The realtime collection only exists in the console project so iterating over every project leads to the not found error. In addition, the deleteForProjectIds() doesn't include the console project so the realtime records were not being cleaned up properly.
This commit is contained in:
parent
f656002a03
commit
2d2af20547
|
@ -512,13 +512,11 @@ class DeletesV1 extends Worker
|
|||
*/
|
||||
protected function deleteRealtimeUsage(string $datetime): void
|
||||
{
|
||||
$this->deleteForProjectIds(function (Document $project) use ($datetime) {
|
||||
$dbForProject = $this->getProjectDB($project);
|
||||
// Delete Dead Realtime Logs
|
||||
$this->deleteByGroup('realtime', [
|
||||
Query::lessThan('timestamp', $datetime)
|
||||
], $dbForProject);
|
||||
});
|
||||
$dbForConsole = $this->getConsoleDB();
|
||||
// Delete Dead Realtime Logs
|
||||
$this->deleteByGroup('realtime', [
|
||||
Query::lessThan('timestamp', $datetime)
|
||||
], $dbForConsole);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue