* @param string $command Job command
* @param Title $title Associated title
* @param array|bool $params Job parameters
- * @param int $id Job identifier
* @throws MWException
* @return Job
*/
- public static function factory( $command, Title $title, $params = false, $id = 0 ) {
+ public static function factory( $command, Title $title, $params = false ) {
global $wgJobClasses;
if ( isset( $wgJobClasses[$command] ) ) {
$class = $wgJobClasses[$command];
- return new $class( $title, $params, $id );
+ return new $class( $title, $params );
}
throw new MWException( "Invalid job command `{$command}`" );
}
* @ingroup Upload
*/
class AssembleUploadChunksJob extends Job {
- public function __construct( $title, $params, $id = 0 ) {
- parent::__construct( 'AssembleUploadChunks', $title, $params, $id );
+ public function __construct( $title, $params ) {
+ parent::__construct( 'AssembleUploadChunks', $title, $params );
$this->removeDuplicates = true;
}
* @param array|bool $params
* @param int $id
*/
- function __construct( $title, $params = false, $id = 0 ) {
- parent::__construct( 'fixDoubleRedirect', $title, $params, $id );
+ function __construct( $title, $params = false ) {
+ parent::__construct( 'fixDoubleRedirect', $title, $params );
$this->reason = $params['reason'];
$this->redirTitle = Title::newFromText( $params['redirTitle'] );
}
* @ingroup JobQueue
*/
class EmaillingJob extends Job {
- function __construct( $title, $params, $id = 0 ) {
- parent::__construct( 'sendMail', Title::newMainPage(), $params, $id );
+ function __construct( $title, $params ) {
+ parent::__construct( 'sendMail', Title::newMainPage(), $params );
}
function run() {
* @ingroup JobQueue
*/
class EnotifNotifyJob extends Job {
- function __construct( $title, $params, $id = 0 ) {
- parent::__construct( 'enotifNotify', $title, $params, $id );
+ function __construct( $title, $params ) {
+ parent::__construct( 'enotifNotify', $title, $params );
}
function run() {
* @ingroup JobQueue
*/
class HTMLCacheUpdateJob extends Job {
- function __construct( $title, $params = '', $id = 0 ) {
- parent::__construct( 'htmlCacheUpdate', $title, $params, $id );
+ function __construct( $title, $params = '' ) {
+ parent::__construct( 'htmlCacheUpdate', $title, $params );
// Base backlink purge jobs can be de-duplicated
$this->removeDuplicates = ( !isset( $params['range'] ) && !isset( $params['pages'] ) );
}
* @param array $params job parameters (lives, usleep)
* @param int $id Job id
*/
- function __construct( $title, $params, $id = 0 ) {
- parent::__construct( 'null', $title, $params, $id );
+ function __construct( $title, $params ) {
+ parent::__construct( 'null', $title, $params );
if ( !isset( $this->params['lives'] ) ) {
$this->params['lives'] = 1;
}
* @ingroup Upload
*/
class PublishStashedFileJob extends Job {
- public function __construct( $title, $params, $id = 0 ) {
- parent::__construct( 'PublishStashedFile', $title, $params, $id );
+ public function __construct( $title, $params ) {
+ parent::__construct( 'PublishStashedFile', $title, $params );
$this->removeDuplicates = true;
}
* @ingroup JobQueue
*/
class RefreshLinksJob extends Job {
- function __construct( $title, $params = '', $id = 0 ) {
- parent::__construct( 'refreshLinks', $title, $params, $id );
+ function __construct( $title, $params = '' ) {
+ parent::__construct( 'refreshLinks', $title, $params );
// Base backlink update jobs and per-title update jobs can be de-duplicated.
// If template A changes twice before any jobs run, a clean queue will have:
// (A base, A base)
* @deprecated 1.23
*/
class RefreshLinksJob2 extends Job {
- function __construct( $title, $params, $id = 0 ) {
- parent::__construct( 'refreshLinks2', $title, $params, $id );
+ function __construct( $title, $params ) {
+ parent::__construct( 'refreshLinks2', $title, $params );
// Base jobs for large templates can easily be de-duplicated
$this->removeDuplicates = !isset( $params['start'] ) && !isset( $params['end'] );
}
/** @var User */
protected $user;
- public function __construct( $title, $params, $id = 0 ) {
- parent::__construct( 'uploadFromUrl', $title, $params, $id );
+ public function __construct( $title, $params ) {
+ parent::__construct( 'uploadFromUrl', $title, $params );
}
public function run() {