X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcopyJobQueue.php;h=a9c9547ec7d83fa2f14156777fb43f047796cd88;hb=35b6a6dcf9e6c6d5d132fa0cb0e01308b65a3b02;hp=e833115ba9422d30dbdedc33d52fd16ee6c897c6;hpb=a492cf4c3498edbea090c5eccc2515b4d4a1724b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/copyJobQueue.php b/maintenance/copyJobQueue.php index e833115ba9..a9c9547ec7 100644 --- a/maintenance/copyJobQueue.php +++ b/maintenance/copyJobQueue.php @@ -78,19 +78,18 @@ 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 ); } }