X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fjobqueue%2FJob.php;h=f814ceeb1b8b7440d1ae6437a10a96fb0da37eab;hb=6fb3e46c6714af329f6feb0f949e203d17b27ea0;hp=bbd0ddb5f8dffd327116779b2afa8e3471174864;hpb=62d543af640479a1ecbd4de69b3f975e509ca1ab;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/Job.php b/includes/jobqueue/Job.php index bbd0ddb5f8..f814ceeb1b 100644 --- a/includes/jobqueue/Job.php +++ b/includes/jobqueue/Job.php @@ -301,7 +301,9 @@ abstract class Job implements IJobSpecification { } /** - * @param callable $callback + * @param callable $callback A function with one parameter, the success status, which will be + * false if the job failed or it succeeded but the DB changes could not be committed or + * any deferred updates threw an exception. (This parameter was added in 1.28.) * @since 1.27 */ protected function addTeardownCallback( $callback ) { @@ -310,12 +312,12 @@ abstract class Job implements IJobSpecification { /** * Do any final cleanup after run(), deferred updates, and all DB commits happen - * + * @param bool $status Whether the job, its deferred updates, and DB commit all succeeded * @since 1.27 */ - public function teardown() { + public function teardown( $status ) { foreach ( $this->teardownCallbacks as $callback ) { - call_user_func( $callback ); + call_user_func( $callback, $status ); } }