40 lines
681 B
PHP
40 lines
681 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use Log;
|
|
use App\Jobs\Job;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use App\Model\Video;
|
|
use Artisan;
|
|
|
|
class VideoMove extends Job implements ShouldQueue
|
|
{
|
|
use InteractsWithQueue, SerializesModels;
|
|
|
|
private $video;
|
|
|
|
/**
|
|
* Create a new job instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct(Video $video)
|
|
{
|
|
$this->video = $video;
|
|
}
|
|
|
|
/**
|
|
* Execute the job.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function handle()
|
|
{
|
|
Log::info(sprintf('%s: Moving [%s]',__METHOD__,$this->video->id));
|
|
Artisan::call('video:move',['--id' => $this->video->id]);
|
|
}
|
|
}
|