Initial Commit
linter / quality (push) Canceled after 0s
tests / ci (8.3) (push) Canceled after 0s
tests / ci (8.4) (push) Canceled after 0s
tests / ci (8.5) (push) Canceled after 0s

This commit is contained in:
2026-08-29 00:17:41 +10:00
parent 37ff8e0a88
commit b2f2d8b104
13 changed files with 378 additions and 35 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Console\Commands;
use App\Models\Story;
use App\Services\StoryMediaCacher;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
#[Signature('stories:cache-media')]
#[Description('Download and locally cache any story media still pointing at Instagram\'s CDN')]
class CacheStoryMedia extends Command
{
public function handle(StoryMediaCacher $mediaCacher): int
{
$count = 0;
foreach (Story::query()->cursor() as $story) {
$mediaCacher->cache($story);
$count++;
}
$this->info("Checked {$count} stories.");
return self::SUCCESS;
}
}