maintanance and downloading files.

This commit is contained in:
Krzysztof Płaczek
2022-11-16 07:18:21 +01:00
parent 086e4b56b5
commit 21f61b0911
10 changed files with 88 additions and 36 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Jobs;
use App\Http\SymfonyCastDl\SymfonyCastDlService;
use App\Models\Chapter;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class DownloadVideoFile implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(private int $chapterId)
{
//
}
public function handle(SymfonyCastDlService $symfonyCastDlService)
{
$symfonyCastDlService->videoSize(Chapter::find($this->chapterId));
}
}

View File

@@ -20,17 +20,8 @@ class GetVideoFileSize implements ShouldQueue
{
}
public function handle(HtmlParser $htmlParser)
public function handle(SymfonyCastDlService $symfonyCastDlService)
{
// $this->
// $this->videoSize($this->chapter);
// $this->chapter->save();
$service = new SymfonyCastDlService($htmlParser);
$service->videoSize(Chapter::find($this->chapterId));
// dd($this->chapterId);
$symfonyCastDlService->videoSize(Chapter::find($this->chapterId));
}
}