diff options
Diffstat (limited to 'Echo/includes/jobs/NotificationJob.php')
-rw-r--r-- | Echo/includes/jobs/NotificationJob.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Echo/includes/jobs/NotificationJob.php b/Echo/includes/jobs/NotificationJob.php index 00282c00..06fe226b 100644 --- a/Echo/includes/jobs/NotificationJob.php +++ b/Echo/includes/jobs/NotificationJob.php @@ -1,16 +1,14 @@ <?php class EchoNotificationJob extends Job { - private $eventId; - function __construct( $title, $params ) { + public function __construct( Title $title, array $params ) { parent::__construct( 'EchoNotificationJob', $title, $params ); - $this->eventId = $params['eventId']; } - function run() { - MWEchoDbFactory::newFromDefault()->waitForSlaves(); - $event = EchoEvent::newFromID( $this->eventId ); + public function run() { + $eventMapper = new EchoEventMapper(); + $event = $eventMapper->fetchById( $this->params['eventId'], true ); EchoNotificationController::notify( $event, false ); return true; |