From: Aaron Schulz Date: Thu, 12 Jul 2012 23:33:27 +0000 (-0700) Subject: [FileBackend] Made copy script retry on batch copy failure. X-Git-Tag: 1.31.0-rc.0~23060 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=0126fd93a196e65ecd369109eb32c78903f3a59f;p=lhc%2Fweb%2Fwiklou.git [FileBackend] Made copy script retry on batch copy failure. Change-Id: I5db35371a41fa72d449cba1fb7e15f19f0cefa21 --- diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php index 184bf3d8ed..548a33b358 100644 --- a/maintenance/copyFileBackend.php +++ b/maintenance/copyFileBackend.php @@ -153,6 +153,10 @@ class CopyFileBackend extends Maintenance { $t_start = microtime( true ); $status = $dst->doQuickOperations( $ops ); + if ( !$status->isOK() ) { + sleep( 10 ); // wait and retry copy again + $status = $dst->doQuickOperations( $ops ); + } $ellapsed_ms = floor( ( microtime( true ) - $t_start ) * 1000 ); if ( !$status->isOK() ) { $this->error( print_r( $status->getErrorsArray(), true ) );