36 parent::__construct(
'duplicate',
$params );
46 $djob =
new self(
$job->getParams() );
47 $djob->command =
$job->getType();
48 $djob->params = is_array( $djob->params ) ? $djob->params : [];
49 $djob->params = [
'isDuplicate' => true ] + $djob->params;
50 $djob->metadata =
$job->getMetadata();
55 public function run() {
No-op job that does nothing.
__construct(array $params)
Callers should use DuplicateJob::newFromJob() instead.
static newFromJob(RunnableJob $job)
Get a duplicate no-op version of a job.
Describe and execute a background job.
array $params
Array of job parameters.
Interface for generic jobs only uses the parameters field and are JSON serializable.
Job that has a run() method and metadata accessors for JobQueue::pop() and JobQueue::ack().
if(count( $args)< 1) $job