mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix: guard push ledger cleanup for missing collection
Co-authored-by: ArnabChatterjee20k <83803257+ArnabChatterjee20k@users.noreply.github.com>
This commit is contained in:
1 parent
d6b820e064
commit
d0e8faf6c9
1 file changed
+4
@@ -1930,6 +1930,10 @@ class Deletes extends Action
|
||||
Console::info('Delete expired push ledger messages');
|
||||
|
||||
$dbForProject = $getProjectDB($project);
|
||||
if ($dbForProject->getCollection('appwritePushLedger')->isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$expired = DateTime::addSeconds(new \DateTime(), -1 * 60 * 60 * 24 * 7);
|
||||
|
||||
$dbForProject->deleteDocuments('appwritePushLedger', [
|
||||
|
||||
Reference in new issue
Block a user