X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FcopyJobQueue.php;h=c5a78278f7fda245ec62c87923618e2151d4c9f0;hb=75e46771dc4a848ef116001a74c3c1a54c3af695;hp=3e193976bad146aefe3452b899c46b6378db291b;hpb=de01d19c3081354af2788f3589b61f256ffe827c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/copyJobQueue.php b/maintenance/copyJobQueue.php index 3e193976ba..c5a78278f7 100644 --- a/maintenance/copyJobQueue.php +++ b/maintenance/copyJobQueue.php @@ -21,7 +21,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Copy all jobs from one job queue system to another. @@ -78,17 +78,15 @@ class CopyJobQueue extends Maintenance { ++$total; $batch[] = $job; if ( count( $batch ) >= $this->mBatchSize ) { - if ( $dst->push( $batch ) ) { - $totalOK += count( $batch ); - } + $dst->push( $batch ); + $totalOK += count( $batch ); $batch = array(); $dst->waitForBackups(); } } if ( count( $batch ) ) { - if ( $dst->push( $batch ) ) { - $totalOK += count( $batch ); - } + $dst->push( $batch ); + $totalOK += count( $batch ); $dst->waitForBackups(); } return array( $total, $totalOK ); @@ -96,4 +94,4 @@ class CopyJobQueue extends Maintenance { } $maintClass = 'CopyJobQueue'; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;