mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-14 18:02:01 -04:00
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Modules\StudioPlus\Jobs;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldBeUnique;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Queue\Events\JobFailed;
|
|
use Illuminate\Support\Facades\Queue;
|
|
use Modules\StudioPlus\Entities\WatermarkingJob;
|
|
use Modules\StudioPlus\Events\UpdateJobStatusEvent;
|
|
use Modules\StudioPlus\Services\VideoProcessingService;
|
|
use Throwable;
|
|
|
|
class ApplyWatermarkNewServer implements ShouldQueue, ShouldBeUnique
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
public $timeout = 3000;
|
|
public $failOnTimeout = false;
|
|
protected $service;
|
|
|
|
public function __construct(protected $video, protected $user)
|
|
{
|
|
$this->connection = 'watermarking';
|
|
$this->queue = 'watermarking';
|
|
$this->service = new VideoProcessingService();
|
|
$this->user = $user;
|
|
}
|
|
|
|
public function handle()
|
|
{
|
|
$this->service->processInNewServer($this->video->id, $this->user->id);
|
|
}
|
|
}
|