mirror of
https://github.com/appwrite/appwrite
synced 2026-05-19 15:08:43 +00:00
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
1 changed files with 5 additions and 7 deletions
|
|
@ -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