mediawiki-extensions-Echo/includes/jobs/NotificationJob.php

20 lines
448 B
PHP
Raw Normal View History

<?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;
}
}