JobQueueGroup: Improve failed-to-insert error
authorChad Horohoe <chadh@wikimedia.org>
Wed, 21 Feb 2018 01:13:12 +0000 (17:13 -0800)
committerChad <chadh@wikimedia.org>
Fri, 23 Feb 2018 01:57:11 +0000 (01:57 +0000)
This could possibly use LoggerFactory & friends to use them as
parameters, but either way let's sort the entries so they're
at least remotely capable of self-grouping.

Change-Id: Iaf435093d70add02e2f82e3037c64fec11870979

includes/jobqueue/JobQueueGroup.php

index addc7fc..21f09e5 100644 (file)
@@ -468,7 +468,8 @@ class JobQueueGroup {
        function __destruct() {
                $n = count( $this->bufferedJobs );
                if ( $n > 0 ) {
-                       $type = implode( ', ', array_unique( array_map( 'get_class', $this->bufferedJobs ) ) );
+                       $type = implode( ', ', array_unique( array_map( 'get_class', $this->bufferedJobs ),
+                               SORT_STRING ) );
                        trigger_error( __METHOD__ . ": $n buffered job(s) of type(s) $type never inserted." );
                }
        }