laravel-rabbitmq/producer/app/Jobs/ScreenshotJob.php

38 lines
760 B
PHP

<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Artisan;
class ScreenshotJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $process;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
$process = 'process' . random_int(1, 3);
$this->process = $process;
$this->onQueue($process);
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
}
}