Merge "Move interface IJobSpecification to own file"
This commit is contained in:
commit
5f9e9f4e07
4 changed files with 85 additions and 66 deletions
|
|
@ -78,7 +78,6 @@
|
|||
any new occurrences.
|
||||
-->
|
||||
<exclude-pattern>*/includes/Feed\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/jobqueue/JobSpecification\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/RevisionList\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/installer/PhpBugTests\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/specials/SpecialMostinterwikis\.php</exclude-pattern>
|
||||
|
|
@ -238,7 +237,6 @@
|
|||
<exclude-pattern>*/includes/htmlform/HTMLFormElement\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/jobqueue/aggregator/JobQueueAggregator\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/jobqueue/JobQueue\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/jobqueue/JobSpecification\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/libs/filebackend/FileBackendStore\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/libs/filebackend/SwiftFileBackend\.php</exclude-pattern>
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ $wgAutoloadLocalClasses = [
|
|||
'IEContentAnalyzer' => __DIR__ . '/includes/libs/mime/IEContentAnalyzer.php',
|
||||
'IEUrlExtension' => __DIR__ . '/includes/libs/IEUrlExtension.php',
|
||||
'IExpiringStore' => __DIR__ . '/includes/libs/objectcache/IExpiringStore.php',
|
||||
'IJobSpecification' => __DIR__ . '/includes/jobqueue/JobSpecification.php',
|
||||
'IJobSpecification' => __DIR__ . '/includes/jobqueue/IJobSpecification.php',
|
||||
'ILocalizedException' => __DIR__ . '/includes/exception/ILocalizedException.php',
|
||||
'IMaintainableDatabase' => __DIR__ . '/includes/libs/rdbms/database/IMaintainableDatabase.php',
|
||||
'IP' => __DIR__ . '/includes/libs/IP.php',
|
||||
|
|
|
|||
84
includes/jobqueue/IJobSpecification.php
Normal file
84
includes/jobqueue/IJobSpecification.php
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
/**
|
||||
* Job queue task description base code.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
* @file
|
||||
*/
|
||||
|
||||
/**
|
||||
* Job queue task description interface
|
||||
*
|
||||
* @ingroup JobQueue
|
||||
* @since 1.23
|
||||
*/
|
||||
interface IJobSpecification {
|
||||
/**
|
||||
* @return string Job type
|
||||
*/
|
||||
public function getType();
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getParams();
|
||||
|
||||
/**
|
||||
* @return int|null UNIX timestamp to delay running this job until, otherwise null
|
||||
*/
|
||||
public function getReleaseTimestamp();
|
||||
|
||||
/**
|
||||
* @return bool Whether only one of each identical set of jobs should be run
|
||||
*/
|
||||
public function ignoreDuplicates();
|
||||
|
||||
/**
|
||||
* Subclasses may need to override this to make duplication detection work.
|
||||
* The resulting map conveys everything that makes the job unique. This is
|
||||
* only checked if ignoreDuplicates() returns true, meaning that duplicate
|
||||
* jobs are supposed to be ignored.
|
||||
*
|
||||
* @return array Map of key/values
|
||||
*/
|
||||
public function getDeduplicationInfo();
|
||||
|
||||
/**
|
||||
* @see JobQueue::deduplicateRootJob()
|
||||
* @return array
|
||||
* @since 1.26
|
||||
*/
|
||||
public function getRootJobParams();
|
||||
|
||||
/**
|
||||
* @see JobQueue::deduplicateRootJob()
|
||||
* @return bool
|
||||
* @since 1.22
|
||||
*/
|
||||
public function hasRootJobParams();
|
||||
|
||||
/**
|
||||
* @see JobQueue::deduplicateRootJob()
|
||||
* @return bool Whether this is job is a root job
|
||||
*/
|
||||
public function isRootJob();
|
||||
|
||||
/**
|
||||
* @return Title Descriptive title (this can simply be informative)
|
||||
*/
|
||||
public function getTitle();
|
||||
}
|
||||
|
|
@ -20,69 +20,6 @@
|
|||
* @file
|
||||
*/
|
||||
|
||||
/**
|
||||
* Job queue task description interface
|
||||
*
|
||||
* @ingroup JobQueue
|
||||
* @since 1.23
|
||||
*/
|
||||
interface IJobSpecification {
|
||||
/**
|
||||
* @return string Job type
|
||||
*/
|
||||
public function getType();
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getParams();
|
||||
|
||||
/**
|
||||
* @return int|null UNIX timestamp to delay running this job until, otherwise null
|
||||
*/
|
||||
public function getReleaseTimestamp();
|
||||
|
||||
/**
|
||||
* @return bool Whether only one of each identical set of jobs should be run
|
||||
*/
|
||||
public function ignoreDuplicates();
|
||||
|
||||
/**
|
||||
* Subclasses may need to override this to make duplication detection work.
|
||||
* The resulting map conveys everything that makes the job unique. This is
|
||||
* only checked if ignoreDuplicates() returns true, meaning that duplicate
|
||||
* jobs are supposed to be ignored.
|
||||
*
|
||||
* @return array Map of key/values
|
||||
*/
|
||||
public function getDeduplicationInfo();
|
||||
|
||||
/**
|
||||
* @see JobQueue::deduplicateRootJob()
|
||||
* @return array
|
||||
* @since 1.26
|
||||
*/
|
||||
public function getRootJobParams();
|
||||
|
||||
/**
|
||||
* @see JobQueue::deduplicateRootJob()
|
||||
* @return bool
|
||||
* @since 1.22
|
||||
*/
|
||||
public function hasRootJobParams();
|
||||
|
||||
/**
|
||||
* @see JobQueue::deduplicateRootJob()
|
||||
* @return bool Whether this is job is a root job
|
||||
*/
|
||||
public function isRootJob();
|
||||
|
||||
/**
|
||||
* @return Title Descriptive title (this can simply be informative)
|
||||
*/
|
||||
public function getTitle();
|
||||
}
|
||||
|
||||
/**
|
||||
* Job queue task description base code
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue