Update StoryGC command

pull/3910/head
Daniel Supernault 2022-12-05 03:28:31 -07:00
rodzic 6e16158afc
commit 3ef66628ad
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -3,7 +3,6 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use App\Story;
use App\StoryView;
@ -51,7 +50,7 @@ class StoryGC extends Command
protected function archiveExpiredStories()
{
$stories = Story::whereActive(true)
->where('created_at', '<', now()->subHours(24))
->where('expires_at', '<', now())
->get();
foreach($stories as $story) {
@ -79,6 +78,7 @@ class StoryGC extends Command
}
StoryRotateMedia::dispatch($story)->onQueue('story');
StoryService::removeRotateQueue($id);
return;
});
}
}