MediaWiki  REL1_21
NullJob Class Reference

Degenerate job that does nothing, but can optionally replace itself in the queue and/or sleep for a brief time period. More...

Inheritance diagram for NullJob:
Collaboration diagram for NullJob:

List of all members.

Public Member Functions

 __construct ($title, $params, $id=0)
 run ()
 Run the job.

Detailed Description

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.

Definition at line 31 of file NullJob.php.


Constructor & Destructor Documentation

NullJob::__construct ( title,
params,
id = 0 
)
Parameters:
$titleTitle (can be anything)
array$paramsjob parameters (lives, usleep)
$idInteger: job id

Definition at line 37 of file NullJob.php.

References Job\$id, Job\$params, Job\$title, and empty.


Member Function Documentation

Run the job.

Returns:
boolean success

Reimplemented from Job.

Definition at line 48 of file NullJob.php.

References $job, Job\$params, JobQueueGroup\singleton(), and title.


The documentation for this class was generated from the following file: