first commit
This commit is contained in:
27
app/Http/Controllers/TestController.php
Normal file
27
app/Http/Controllers/TestController.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Jobs\RunVideoRenderPipelineJob;
|
||||
use App\Models\Video;
|
||||
|
||||
class TestController extends Controller
|
||||
{
|
||||
public function RunVideoRenderPipelineJob()
|
||||
{
|
||||
$dispatch_job = true;
|
||||
$video = Video::latest()->first();
|
||||
|
||||
if ($video) {
|
||||
|
||||
if ($dispatch_job) {
|
||||
RunVideoRenderPipelineJob::dispatch($video->id)->onQueue('render');
|
||||
} else {
|
||||
$job = new RunVideoRenderPipelineJob($video->id);
|
||||
$job->handle();
|
||||
}
|
||||
} else {
|
||||
echo 'NO VIDEO';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user