final public function batchPush( array $jobs, $flags = 0 ) {
$this->assertNotReadOnly();
- if ( !count( $jobs ) ) {
+ if ( $jobs === [] ) {
return; // nothing to do
}
global $wgJobClasses;
$this->assertNotReadOnly();
- if ( !WikiMap::isCurrentWikiDomain( $this->domain ) ) {
+ if ( !WikiMap::isCurrentWikiDbDomain( $this->domain ) ) {
throw new MWException(
"Cannot pop '{$this->type}' job off foreign '{$this->domain}' wiki queue." );
} elseif ( !isset( $wgJobClasses[$this->type] ) ) {
$stats->updateCount( "jobqueue.{$key}.{$type}", $delta );
}
}
-
-/**
- * @ingroup JobQueue
- * @since 1.22
- */
-class JobQueueError extends MWException {
-}
-
-class JobQueueConnectionError extends JobQueueError {
-}
-
-class JobQueueReadOnlyError extends JobQueueError {
-
-}