1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

Update MediaS3GarbageCollector, fix handle

This commit is contained in:
Daniel Supernault 2023-04-08 04:25:52 -06:00
parent 102e71310d
commit 2eee36cfbd
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -66,7 +66,13 @@ class MediaS3GarbageCollector extends Command
return;
}
$minId = Media::orderByDesc('id')->where('created_at', '<', now()->subHours(12))->first()->id;
$minId = Media::orderByDesc('id')->where('created_at', '<', now()->subHours(12))->first();
if(!$minId) {
return;
} else {
$minId = $minId->id;
}
return $hugeMode ?
$this->hugeMode($minId, $limit, $log) :