r83510 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83509‎ | r83510 | r83511 >
Date:05:44, 8 March 2011
Author:tstarling
Status:ok
Tags:
Comment:
Prioritise various types of jobs above refreshLinks2. Committing for test on server.
Modified paths:
  • /branches/wmf/1.17wmf1/maintenance/jobs-loop.sh (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/maintenance/jobs-loop.sh
@@ -6,28 +6,32 @@
77 type=$1
88 }
99
 10+types="htmlCacheUpdate sendMail enotifNotify uploadFromUrl fixDoubleRedirect"
 11+
1012 cd `readlink -f /usr/local/apache/common/php/maintenance`
1113 while [ 1 ];do
 14+ # 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
 21+ done
 22+
 23+ # Do the remaining types
1224 db=
1325 while [ -z $db ];do
14 - if [ ! -z "$type" ]; then
15 - db=`php -n nextJobDB.php --type=$type`
16 - else
17 - db=`php -n nextJobDB.php`
18 - fi
 26+ db=`php -n nextJobDB.php`
1927
2028 if [ -z $db ];then
2129 # No jobs to do, wait for a while
2230 echo "No jobs..."
2331 sleep 5
 32+ else
 33+ echo $db
 34+ nice -n 20 php runJobs.php --wiki="$db" --procs=4
2435 fi
2536 done
26 - echo $db
27 - if [ ! -z "$type" ]; then
28 - nice -n 20 php runJobs.php $db --procs=4 $type &
29 - else
30 - nice -n 20 php runJobs.php $db --procs=4 &
31 - fi
32 - wait
3337 done
3438

Status & tagging log