From: Umherirrender Date: Sun, 30 Sep 2018 15:21:11 +0000 (+0200) Subject: Fix caller name in JobRunner::commitMasterChanges X-Git-Tag: 1.34.0-rc.0~3933 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=ff95c7a4bacb77b41f2494df40665e02dc229891;p=lhc%2Fweb%2Fwiklou.git Fix caller name in JobRunner::commitMasterChanges Use the given fname for all places. The __METHOD__ inside the unlock closure would be shown as {closure} in logs Change-Id: I87ef26e893af858f58d1a77dcb2d8ee192456f5c --- diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php index dab9b14d19..1e8316795c 100644 --- a/includes/jobqueue/JobRunner.php +++ b/includes/jobqueue/JobRunner.php @@ -576,12 +576,12 @@ class JobRunner implements LoggerAwareInterface { $this->debugCallback( $msg ); // Wait for an exclusive lock to commit - if ( !$dbwSerial->lock( 'jobrunner-serial-commit', __METHOD__, 30 ) ) { + if ( !$dbwSerial->lock( 'jobrunner-serial-commit', $fnameTrxOwner, 30 ) ) { // This will trigger a rollback in the main loop throw new DBError( $dbwSerial, "Timed out waiting on commit queue." ); } - $unlocker = new ScopedCallback( function () use ( $dbwSerial ) { - $dbwSerial->unlock( 'jobrunner-serial-commit', __METHOD__ ); + $unlocker = new ScopedCallback( function () use ( $dbwSerial, $fnameTrxOwner ) { + $dbwSerial->unlock( 'jobrunner-serial-commit', $fnameTrxOwner ); } ); // Wait for the replica DBs to catch up