Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | List of all members
SMW\MediaWiki\JobQueue Class Reference

Public Member Functions

 __construct (JobQueueGroup $jobQueueGroup)
 
 disableCache ( $disableCache=true)
 
 isDelayedJobsEnabled ( $type)
 
 runFromQueue (array $list)
 
 pop ( $type)
 
 ack (\Job $job)
 
 delete ( $type)
 
 push ( $jobs)
 
 lazyPush ( $jobs)
 
 getQueueSizes ()
 
 getQueueSize ( $type)
 
 hasPendingJob ( $type)
 

Static Public Member Functions

static mapLegacyType ( $type)
 

Detailed Description

MediaWiki's JobQueue contains mostly final methods making it difficult to use an instance during tests hence this class provides a reduced interface with mockable methods.

GNU GPL v2+

Since
3.0
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\MediaWiki\JobQueue::__construct ( JobQueueGroup  $jobQueueGroup)
Since
3.0
Parameters
JobQueueGroup$jobQueueGroup

Member Function Documentation

◆ ack()

SMW\MediaWiki\JobQueue::ack ( \Job  $job)

Acknowledge that a job was completed

Since
3.0
Parameters
Job$job

◆ delete()

SMW\MediaWiki\JobQueue::delete (   $type)
Since
3.0
Parameters
string$type

◆ disableCache()

SMW\MediaWiki\JobQueue::disableCache (   $disableCache = true)
Since
3.0
Parameters
boolean$disableCache

◆ getQueueSize()

SMW\MediaWiki\JobQueue::getQueueSize (   $type)
Since
3.0
Parameters
string$type
Returns
integer

◆ getQueueSizes()

SMW\MediaWiki\JobQueue::getQueueSizes ( )
Since
3.0
Returns
array

◆ hasPendingJob()

SMW\MediaWiki\JobQueue::hasPendingJob (   $type)
Since
3.0
Parameters
string$type
Returns
boolean

◆ isDelayedJobsEnabled()

SMW\MediaWiki\JobQueue::isDelayedJobsEnabled (   $type)
Since
3.0
Parameters
string$type
Returns
boolean

◆ lazyPush()

SMW\MediaWiki\JobQueue::lazyPush (   $jobs)
Since
3.0
Parameters
Job|Job[]$jobs

◆ mapLegacyType()

static SMW\MediaWiki\JobQueue::mapLegacyType (   $type)
static
Note
FIXME Remove with 3.1
Since
3.0
Parameters
string$type
Returns
string

◆ pop()

SMW\MediaWiki\JobQueue::pop (   $type)
Since
3.0
Parameters
string$type
Returns
Job|boolean

◆ push()

SMW\MediaWiki\JobQueue::push (   $jobs)
Since
3.0
Parameters
Job|Job[]$jobs

◆ runFromQueue()

SMW\MediaWiki\JobQueue::runFromQueue ( array  $list)
Since
3.0
Parameters
array$list
Returns
[]

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

About | General disclaimer | Privacy policy