|
MediaWiki
REL1_23
|
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) | |
| 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 | ||
| ) |
| Title | $title | |
| array | $params | job parameters (lives, usleep) |
Definition at line 52 of file NullJob.php.
References Job\$params, Job\$title, and empty.
| NullJob::run | ( | ) |
Run the job.
Reimplemented from Job.
Definition at line 63 of file NullJob.php.
References $job, Job\$params, JobQueueGroup\singleton(), and title.