This commit is contained in:
2025-09-18 15:31:27 +02:00
commit 2abba0c2b7
406 changed files with 31879 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Console\Commands;
use App\Models\Downloads;
use App\Jobs\GetFileSizeFromCDN;
use Illuminate\Console\Command;
class GetFileSize extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:get-file-size';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get missing filesize from API (Job)';
/**
* Execute the console command.
*/
public function handle()
{
foreach(Downloads::whereNull('size')->get() as $download) {
GetFileSizeFromCDN::dispatch($download->id);
}
$this->comment('Added all missing sizes to Job Queue!');
}
}