mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 09:40:41 +00:00
bf2cc7e687
The `DBMasterPos` class is not JSON-serializable, so we can not transfer the job in the kafka-based queue. Before, we were waiting for slaves before executing the job till the point in time when the job was submitted, now we will just wait for slaves till the point in time the job was executed. That lets up not to include the database master position in the event and make it serializable. Bug: T192945 Change-Id: I7c754bd1e899bad030cc6434be19daf2542e015f
19 lines
417 B
PHP
19 lines
417 B
PHP
<?php
|
|
|
|
class EchoNotificationJob extends Job {
|
|
private $eventId;
|
|
|
|
function __construct( $title, $params ) {
|
|
parent::__construct( 'EchoNotificationJob', $title, $params );
|
|
$this->eventId = $params['eventId'];
|
|
}
|
|
|
|
function run() {
|
|
MWEchoDbFactory::newFromDefault()->waitForSlaves();
|
|
$event = EchoEvent::newFromID( $this->eventId );
|
|
EchoNotificationController::notify( $event, false );
|
|
|
|
return true;
|
|
}
|
|
}
|