maintanance and downloading files.
This commit is contained in:
27
app/Jobs/DownloadVideoFile.php
Normal file
27
app/Jobs/DownloadVideoFile.php
Normal 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));
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user