Index: branches/wmf/1.17wmf1/maintenance/jobs-loop.sh |
— | — | @@ -11,27 +11,29 @@ |
12 | 12 | cd `readlink -f /usr/local/apache/common/php/maintenance` |
13 | 13 | while [ 1 ];do |
14 | 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 |
| 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 |
21 | 26 | done |
22 | 27 | |
23 | 28 | # Do the remaining types |
24 | | - db= |
25 | | - while [ -z $db ];do |
26 | | - db=`php -n nextJobDB.php` |
| 29 | + db=`php -n nextJobDB.php` |
27 | 30 | |
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 |
37 | 39 | done |
38 | 40 | |