Index: trunk/phase3/maintenance/runJobs.php |
— | — | @@ -43,10 +43,15 @@ |
44 | 44 | break; |
45 | 45 | |
46 | 46 | wfWaitForSlaves( 5 ); |
47 | | - print wfTimestamp( TS_DB ) . " " . $job->id . " " . $job->toString() . "\n"; |
| 47 | + $t = microtime( true ); |
48 | 48 | $offset=$job->id; |
| 49 | + $status = $job->run(); |
| 50 | + $t = microtime( true ) - $t; |
| 51 | + $timeMs = intval( $t * 1000 ); |
49 | 52 | if ( !$job->run() ) { |
50 | | - print wfTimestamp( TS_DB ) . " Error: {$job->error}\n"; |
| 53 | + runJobsLog( $job->toString() . " t=$timeMs error={$job->error}" ); |
| 54 | + } else { |
| 55 | + runJobsLog( $job->toString() . " t=$timeMs good" ); |
51 | 56 | } |
52 | 57 | if ( $maxJobs && ++$n > $maxJobs ) { |
53 | 58 | break 2; |
— | — | @@ -54,3 +59,9 @@ |
55 | 60 | } |
56 | 61 | } |
57 | 62 | |
| 63 | + |
| 64 | +function runJobsLog( $msg ) { |
| 65 | + print wfTimestamp( TS_DB ) . " $msg\n"; |
| 66 | + wfDebugLog( 'runJobs', $msg ); |
| 67 | +} |
| 68 | + |