mediawiki-extensions-Echo/includes/jobs/NotificationJob.php
Umherirrender cdae062d47 Improve param docs and add @var to clarify types
Change-Id: I44f872b3a2921e75aab8e22fec57735f17ee1d8b
2019-02-15 21:23:02 +01:00

20 lines
448 B
PHP

<?php
class EchoNotificationJob extends Job {
/** @var int */
private $eventId;
public function __construct( $title, $params ) {
parent::__construct( 'EchoNotificationJob', $title, $params );
$this->eventId = $params['eventId'];
}
public function run() {
MWEchoDbFactory::newFromDefault()->waitForSlaves();
$event = EchoEvent::newFromID( $this->eventId );
EchoNotificationController::notify( $event, false );
return true;
}
}