Merge "Add Priority Hints support"
[lhc/web/wiklou.git] / includes / jobqueue / JobQueue.php
index 3689ba4..660352a 100644 (file)
@@ -323,7 +323,7 @@ abstract class JobQueue {
        final public function batchPush( array $jobs, $flags = 0 ) {
                $this->assertNotReadOnly();
 
-               if ( !count( $jobs ) ) {
+               if ( $jobs === [] ) {
                        return; // nothing to do
                }
 
@@ -366,7 +366,7 @@ abstract class JobQueue {
                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] ) ) {
@@ -724,17 +724,3 @@ abstract class JobQueue {
                $stats->updateCount( "jobqueue.{$key}.{$type}", $delta );
        }
 }
-
-/**
- * @ingroup JobQueue
- * @since 1.22
- */
-class JobQueueError extends MWException {
-}
-
-class JobQueueConnectionError extends JobQueueError {
-}
-
-class JobQueueReadOnlyError extends JobQueueError {
-
-}