2012-06-06 07:04:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class EchoNotificationJob extends Job {
|
|
|
|
function __construct( $title, $params ) {
|
|
|
|
parent::__construct( 'EchoNotificationJob', $title, $params );
|
|
|
|
$this->event = $params['event'];
|
|
|
|
}
|
|
|
|
|
|
|
|
function run() {
|
2013-08-30 02:05:29 +00:00
|
|
|
if ( !empty( $this->params['mainDbMasterPos'] ) ) {
|
|
|
|
wfGetLB()->waitFor( $this->params['mainDbMasterPos'] );
|
|
|
|
}
|
|
|
|
if ( !empty( $this->params['echoDbMasterPos'] ) ) {
|
|
|
|
global $wgEchoCluster;
|
|
|
|
wfGetLBFactory()->getExternalLB( $wgEchoCluster )->waitFor( $this->params['echoDbMasterPos'] );
|
|
|
|
}
|
2012-06-06 07:04:28 +00:00
|
|
|
EchoNotificationController::notify( $this->event, false );
|
2012-07-18 19:39:33 +00:00
|
|
|
return true;
|
2012-06-06 07:04:28 +00:00
|
|
|
}
|
2012-07-18 19:39:33 +00:00
|
|
|
}
|