Use wfWaitForSlaves in upload stash cleanup script
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 8 Apr 2015 16:24:36 +0000 (09:24 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 8 Apr 2015 16:24:29 +0000 (16:24 +0000)
Bug: T95382
Change-Id: I8d93eb15064693634076e864ed6724392448cb45

maintenance/cleanupUploadStash.php

index 24b63a8..70490e1 100644 (file)
@@ -87,6 +87,7 @@ class UploadStashCleanup extends Maintenance {
                                        $this->output( "Failed removing stashed upload with key: $key ($type)\n" );
                                }
                                if ( $i % 100 == 0 ) {
+                                       wfWaitForSlaves();
                                        $this->output( "$i\n" );
                                }
                        }