- }
- # Reopen any connections that have closed
- if ( !wfGetLB()->pingAll()) {
- $this->output( "\n" );
- do {
- $this->error( "Connection failed, reconnecting in 10 seconds..." );
- sleep(10);
- } while ( !wfGetLB()->pingAll() );
- $this->output( "Reconnected\n\n" );
- } else {
- # Commit the results
- $dbw->immediateCommit();
- }
- # Wait for the slave to catch up
- wfWaitForSlaves( 5 );
+ }
+ # Reopen any connections that have closed
+ if ( !wfGetLB()->pingAll() ) {
+ $this->output( "\n" );
+ do {
+ $this->error( "Connection failed, reconnecting in 10 seconds..." );
+ sleep( 10 );
+ } while ( !wfGetLB()->pingAll() );
+ $this->output( "Reconnected\n\n" );
+ } else {
+ # Commit the results
+ $dbw->commit();
+ }
+ # Wait for the slave to catch up
+ wfWaitForSlaves();