Go to the documentation of this file.
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() {
Job that has a run() method and metadata accessors for JobQueue::pop() and JobQueue::ack()
array $params
Array of job parameters.
static newFromJob(RunnableJob $job)
Get a duplicate no-op version of a job.
Class to both describe a background job and handle jobs.
__construct(array $params)
Callers should use DuplicateJob::newFromJob() instead.
No-op job that does nothing.
if(count( $args)< 1) $job
Interface for generic jobs only uses the parameters field and are JSON serializable.