Merge "Job: Remove insert() and batchInsert(), deprecated since 1.21"
This commit is contained in:
commit
24d1fcafba
4 changed files with 5 additions and 32 deletions
|
|
@ -98,6 +98,8 @@ because of Phabricator reports.
|
|||
* The Html5Internal and Html5Depurate tidy driver classes were removed, along with the
|
||||
Balancer tidy implementation. Both implementations were experimental, and were replaced
|
||||
by RemexHtml.
|
||||
* (T179624) Job::insert() and ::batchInsert(), deprecated in 1.21, were both
|
||||
removed. Use JobQueueGroup::singleton()->push() instead.
|
||||
|
||||
=== Deprecations in 1.32 ===
|
||||
* Use of a StartProfiler.php file is deprecated in favour of placing
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@
|
|||
|
||||
/**
|
||||
* Class to both describe a background job and handle jobs.
|
||||
* The queue aspects of this class are now deprecated.
|
||||
* Using the class to push jobs onto queues is deprecated (use JobSpecification).
|
||||
* To push jobs onto queues, use JobQueueGroup::singleton()->push();
|
||||
*
|
||||
* @ingroup JobQueue
|
||||
*/
|
||||
|
|
@ -123,23 +122,6 @@ abstract class Job implements IJobSpecification {
|
|||
return ( $this->executionFlags && $flag ) === $flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch-insert a group of jobs into the queue.
|
||||
* This will be wrapped in a transaction with a forced commit.
|
||||
*
|
||||
* This may add duplicate at insert time, but they will be
|
||||
* removed later on, when the first one is popped.
|
||||
*
|
||||
* @param Job[] $jobs Array of Job objects
|
||||
* @return bool
|
||||
* @deprecated since 1.21
|
||||
*/
|
||||
public static function batchInsert( $jobs ) {
|
||||
wfDeprecated( __METHOD__, '1.21' );
|
||||
JobQueueGroup::singleton()->push( $jobs );
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
@ -346,17 +328,6 @@ abstract class Job implements IJobSpecification {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a single job into the queue.
|
||||
* @return bool True on success
|
||||
* @deprecated since 1.21
|
||||
*/
|
||||
public function insert() {
|
||||
wfDeprecated( __METHOD__, '1.21' );
|
||||
JobQueueGroup::singleton()->push( $this );
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ abstract class JobQueue {
|
|||
$params = $job->getRootJobParams();
|
||||
|
||||
$key = $this->getRootJobCacheKey( $params['rootJobSignature'] );
|
||||
// Callers should call batchInsert() and then this function so that if the insert
|
||||
// Callers should call JobQueueGroup::push() before this method so that if the insert
|
||||
// fails, the de-duplication registration will be aborted. Since the insert is
|
||||
// deferred till "transaction idle", do the same here, so that the ordering is
|
||||
// maintained. Having only the de-duplication registration succeed would cause
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ class JobQueueDB extends JobQueue {
|
|||
throw new MWException( "Cannot register root job; missing 'rootJobTimestamp'." );
|
||||
}
|
||||
$key = $this->getRootJobCacheKey( $params['rootJobSignature'] );
|
||||
// Callers should call batchInsert() and then this function so that if the insert
|
||||
// Callers should call JobQueueGroup::push() before this method so that if the insert
|
||||
// fails, the de-duplication registration will be aborted. Since the insert is
|
||||
// deferred till "transaction idle", do the same here, so that the ordering is
|
||||
// maintained. Having only the de-duplication registration succeed would cause
|
||||
|
|
|
|||
Loading…
Reference in a new issue