Merge maintenance-work branch:
[lhc/web/wiklou.git] / maintenance / showJobs.php
1 <?php
2 /**
3 * Based on runJobs.php
4 *
5 * Report number of jobs currently waiting in master database.
6 *
7 * @file
8 * @ingroup Maintenance
9 * @author Tim Starling
10 * @author Ashar Voultoiz
11 */
12
13 require_once( "Maintenance.php" );
14
15 class ShowJobs extends Maintenance {
16 public function __construct() {
17 parent::__construct();
18 $this->mDescription = "Show number of jobs waiting in master database";
19 }
20 public function execute() {
21 $dbw = wfGetDB( DB_MASTER );
22 $this->output( $dbw->selectField( 'job', 'count(*)', '', 'runJobs.php' ) . "\n" );
23 }
24 }
25
26 $maintClass = "ShowJobs";
27 require_once( DO_MAINTENANCE );