r83511 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83510‎ | r83511 | r83512 >
Date:06:06, 8 March 2011
Author:tstarling
Status:ok
Tags:
Comment:
* Prioritise even more aggressively
* Fixed --type parameter
* Fixed non-prioritised jobs, they shouldn't have been in their own loop
Modified paths:
  • /branches/wmf/1.17wmf1/maintenance/jobs-loop.sh (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/maintenance/jobs-loop.sh
@@ -11,27 +11,29 @@
1212 cd `readlink -f /usr/local/apache/common/php/maintenance`
1313 while [ 1 ];do
1414 # Do the prioritised types
15 - for type in $types; do
16 - db=`php -n nextJobDB.php --type="$type"`
17 - if [ -n "$db" ]; then
18 - echo "$db $type"
19 - nice -n 20 php runJobs.php --wiki="$db" --procs=4 "$type"
20 - fi
 15+ moreprio=y
 16+ while [ -n "$moreprio" ] ; do
 17+ moreprio=
 18+ for type in $types; do
 19+ db=`php -n nextJobDB.php --type="$type"`
 20+ if [ -n "$db" ]; then
 21+ echo "$db $type"
 22+ nice -n 20 php runJobs.php --wiki="$db" --procs=4 --type="$type"
 23+ moreprio=y
 24+ fi
 25+ done
2126 done
2227
2328 # Do the remaining types
24 - db=
25 - while [ -z $db ];do
26 - db=`php -n nextJobDB.php`
 29+ db=`php -n nextJobDB.php`
2730
28 - if [ -z $db ];then
29 - # No jobs to do, wait for a while
30 - echo "No jobs..."
31 - sleep 5
32 - else
33 - echo $db
34 - nice -n 20 php runJobs.php --wiki="$db" --procs=4
35 - fi
36 - done
 31+ if [ -z "$db" ];then
 32+ # No jobs to do, wait for a while
 33+ echo "No jobs..."
 34+ sleep 5
 35+ else
 36+ echo "$db"
 37+ nice -n 20 php runJobs.php --wiki="$db" --procs=4
 38+ fi
3739 done
3840

Status & tagging log