This commit is contained in:
Jake Barnby 2025-11-14 16:16:06 +13:00
parent b9211d7141
commit 0588fb405d

View file

@ -743,10 +743,10 @@ class Deletes extends Action
Console::info("Deleting CSV export files older than " . $oneWeekAgo);
$this->deleteByGroup('bucket_' . $bucket->getSequence(), [
Query::select([...$this->selects, '$createdAt', 'filename', 'path']),
Query::select([...$this->selects, '$createdAt', 'name', 'path']),
Query::equal('bucketId', ['default']),
Query::endsWith('filename', ['.csv']),
Query::createdBefore($oneWeekAgo),
Query::endsWith('name', ['.csv']),
Query::orderDesc('$createdAt'),
Query::orderDesc(),
], $dbForPlatform, function (Document $file) use ($deviceForFiles) {