Reading file size

This commit is contained in:
Krzysztof Płaczek
2022-12-05 19:39:12 +01:00
parent 55c104629f
commit b992d05312
5 changed files with 47 additions and 7 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Console\Commands;
use App\Jobs\DownloadVideoFile;
use App\Jobs\GetVideoFileSize;
use App\Models\Chapter;
use Illuminate\Console\Command;
class UpdateVideoSize extends Command
{
protected $signature = 'symfonycast:video_size';
protected $description = 'Updates information about video size';
public function handle()
{
$chapters = Chapter::where('video_size', 0)->get();
$chapters->each(fn($chapter) => GetVideoFileSize::dispatch($chapter->id));
return self::SUCCESS;
}
}