From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- maintenance/gearman/gearmanWorker.php | 43 ----------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 maintenance/gearman/gearmanWorker.php (limited to 'maintenance/gearman/gearmanWorker.php') diff --git a/maintenance/gearman/gearmanWorker.php b/maintenance/gearman/gearmanWorker.php deleted file mode 100644 index 3ea10081..00000000 --- a/maintenance/gearman/gearmanWorker.php +++ /dev/null @@ -1,43 +0,0 @@ - 1000 ) { - echo "Invalid number of processes, please specify a number between 1 and 1000\n"; - exit( 1 ); - } - $fc = new ForkController( $procs, ForkController::RESTART_ON_ERROR ); - if ( $fc->start() != 'child' ) { - exit( 0 ); - } -} - -if ( !$args ) { - $args = array( 'localhost' ); -} - -if ( isset( $options['fake-job'] ) ) { - $params = unserialize( $options['fake-job'] ); - MWGearmanJob::runNoSwitch( $params ); -} - -$worker = new NonScaryGearmanWorker( $args ); -$worker->addAbility( 'mw_job' ); -$worker->beginWork( 'wfGearmanMonitor' ); - -function wfGearmanMonitor( $idle, $lastJob ) { - static $lastSleep = 0; - $interval = 5; - $now = time(); - if ( $now - $lastSleep >= $interval ) { - wfWaitForSlaves(); - $lastSleep = $now; - } - return false; -} -- cgit v1.2.3-54-g00ecf