2012-06-06 07:04:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class EchoNotificationJob extends Job {
|
2019-02-15 20:23:02 +00:00
|
|
|
/** @var int */
|
2018-06-18 16:54:03 +00:00
|
|
|
private $eventId;
|
|
|
|
|
2018-11-02 17:47:39 +00:00
|
|
|
public function __construct( $title, $params ) {
|
2012-06-06 07:04:28 +00:00
|
|
|
parent::__construct( 'EchoNotificationJob', $title, $params );
|
2018-05-08 19:52:55 +00:00
|
|
|
$this->eventId = $params['eventId'];
|
2012-06-06 07:04:28 +00:00
|
|
|
}
|
|
|
|
|
2018-11-02 17:47:39 +00:00
|
|
|
public function run() {
|
2018-06-18 16:54:03 +00:00
|
|
|
MWEchoDbFactory::newFromDefault()->waitForSlaves();
|
|
|
|
$event = EchoEvent::newFromID( $this->eventId );
|
2018-05-08 19:52:55 +00:00
|
|
|
EchoNotificationController::notify( $event, false );
|
2015-10-01 13:48:52 +00:00
|
|
|
|
2014-08-02 06:41:19 +00:00
|
|
|
return true;
|
|
|
|
}
|
2012-07-18 19:39:33 +00:00
|
|
|
}
|