mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user