MediaWiki
REL1_22
|
Degenerate job that does nothing, but can optionally replace itself in the queue and/or sleep for a brief time period. More...
Public Member Functions | |
__construct ($title, $params, $id=0) | |
run () | |
Run the job. |
Degenerate job that does nothing, but can optionally replace itself in the queue and/or sleep for a brief time period.
These can be used to represent "no-op" jobs or test lock contention and performance.
$ php maintenance/eval.php > $queue = JobQueueGroup::singleton(); > $job = new NullJob( Title::newMainPage(), array( 'lives' => 10 ) ); > $queue->push( $job );
$ php maintenance/showJobs.php --group null: 1 queue; 0 claimed (0 active, 0 abandoned) $
Definition at line 47 of file NullJob.php.
NullJob::__construct | ( | $ | title, |
$ | params, | ||
$ | id = 0 |
||
) |
$title | Title (can be anything) | |
array | $params | job parameters (lives, usleep) |
$id | Integer: job id |
Definition at line 53 of file NullJob.php.
References Job\$id, Job\$params, Job\$title, empty, and params.
NullJob::run | ( | ) |
Run the job.
Reimplemented from Job.
Definition at line 64 of file NullJob.php.
References $job, Job\$params, params, JobQueueGroup\singleton(), and title.