You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
624 B
PHTML
41 lines
624 B
PHTML
2 years ago
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace App\Job;
|
||
|
|
||
|
use Hyperf\AsyncQueue\Job as BaseJob;
|
||
|
|
||
|
class Job extends BaseJob
|
||
|
{
|
||
|
/**
|
||
|
* @var array
|
||
|
*/
|
||
|
public $params;
|
||
|
|
||
|
protected $queueName = 'default';
|
||
|
|
||
|
public function __construct(array $params)
|
||
|
{
|
||
|
$this->params = $this->prepare($params);
|
||
|
}
|
||
|
|
||
|
protected function prepare(array $params): array
|
||
|
{
|
||
|
return $params;
|
||
|
}
|
||
|
|
||
|
public function handle()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
protected function getJobName()
|
||
|
{
|
||
|
return get_called_class();
|
||
|
}
|
||
|
|
||
|
public function getQueueName()
|
||
|
{
|
||
|
return $this->queueName;
|
||
|
}
|
||
|
}
|