jenkins-bot has submitted this change and it was merged.

Change subject: Randomize whether a loop starts in high priority on startup
......................................................................


Randomize whether a loop starts in high priority on startup

* May as well keep the runners out of phase to reduce any high priority
  processing delays.

Change-Id: I28c0b2ce5413fe94699aaa68de5e1b662555b16b
---
M redisJobRunnerService
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/redisJobRunnerService b/redisJobRunnerService
index 75dfac8..182bea1 100755
--- a/redisJobRunnerService
+++ b/redisJobRunnerService
@@ -222,7 +222,7 @@
                foreach ( $this->loopMap as $loop => $info ) {
                        for ( $i=0; $i < $info['runners']; ++$i ) {
                                $pipeline->initSlot( $loop, $i );
-                               $prioMap[$loop] = array( 'high' => true, 
'since' => time() );
+                               $prioMap[$loop] = array( 'high' => 
(bool)mt_rand( 0, 1 ), 'since' => time() );
                        }
                        $this->notice( "Initialized loop $loop with 
{$info['runners']} runner(s)." );
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/150705
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I28c0b2ce5413fe94699aaa68de5e1b662555b16b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/jobrunner
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to