X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fjobqueue%2Fjobs%2FClearWatchlistNotificationsJob.php;h=054718d9005b6db2d3894aacc7716604e440512b;hp=b71580a525d420323c0019ef5aa01c803523051f;hb=6cfb2e3d7a2b96d5041312fcec88248bb46573d7;hpb=078ebf85809cdc9de3feea034a23ce0332b15f0b diff --git a/includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php b/includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php index b71580a525..054718d900 100644 --- a/includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php +++ b/includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php @@ -33,9 +33,9 @@ use MediaWiki\MediaWikiServices; * @ingroup JobQueue * @since 1.31 */ -class ClearWatchlistNotificationsJob extends Job { - function __construct( Title $title, array $params ) { - parent::__construct( 'clearWatchlistNotifications', $title, $params ); +class ClearWatchlistNotificationsJob extends Job implements GenericParameterJob { + function __construct( array $params ) { + parent::__construct( 'clearWatchlistNotifications', $params ); static $required = [ 'userId', 'casTime' ]; $missing = implode( ', ', array_diff( $required, array_keys( $this->params ) ) ); @@ -51,7 +51,7 @@ class ClearWatchlistNotificationsJob extends Job { $lbFactory = $services->getDBLoadBalancerFactory(); $rowsPerQuery = $services->getMainConfig()->get( 'UpdateRowsPerQuery' ); - $dbw = $lbFactory->getMainLB()->getConnection( DB_MASTER ); + $dbw = $lbFactory->getMainLB()->getConnectionRef( DB_MASTER ); $ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ ); $timestamp = $this->params['timestamp'] ?? null; if ( $timestamp === null ) { @@ -96,5 +96,6 @@ class ClearWatchlistNotificationsJob extends Job { $firstBatch = false; } } while ( $idsToUpdate ); + return true; } }