BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
NullJob Class Reference
Inheritance diagram for NullJob:
Collaboration diagram for NullJob:

Public Member Functions

 __construct (Title $title, array $params)
 run ()
- Public Member Functions inherited from Job
 run ()
 __construct ($command, $title, $params=false)
 getType ()
 getTitle ()
 getParams ()
 getReleaseTimestamp ()
 getQueuedTimestamp ()
 getRequestId ()
 getReadyTimestamp ()
 ignoreDuplicates ()
 allowRetries ()
 workItemCount ()
 getDeduplicationInfo ()
 getRootJobParams ()
 hasRootJobParams ()
 isRootJob ()
 teardown ()
 insert ()
 toString ()
 getLastError ()

Additional Inherited Members

- Static Public Member Functions inherited from Job
static factory ($command, Title $title, $params=[])
static batchInsert ($jobs)
static newRootJobParams ($key)
- Public Attributes inherited from Job
 $metadata = []
- Protected Member Functions inherited from Job
 addTeardownCallback ($callback)
 setLastError ($error)
- Protected Attributes inherited from Job
 $teardownCallbacks = []

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.

Inserting a null job in the configured job queue:
$ php maintenance/eval.php
> $job = new NullJob( Title::newMainPage(), array( 'lives' => 10 ) );
> $queue->push( $job );
You can then confirm the job has been enqueued by using the showJobs.php maintenance utility:
$ php maintenance/showJobs.php --group
null: 1 queue; 0 claimed (0 active, 0 abandoned)

Constructor & Destructor Documentation

NullJob::__construct ( Title  $title,
array  $params 
array$paramsJob parameters (lives, usleep)

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