X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2FJobQueueRedis.php;h=deb5aa5a3a9fa42b12a9b4da8cd8eaff544531e1;hb=6ae9367cddf8565c948f4d9458b07bb688f2ddc2;hp=29c8068a63128ee0c7e835ab2985c4b1c9211534;hpb=937ae6444a683a3b0aaf14c21f529ad0e91419ef;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/JobQueueRedis.php b/includes/jobqueue/JobQueueRedis.php index 29c8068a63..deb5aa5a3a 100644 --- a/includes/jobqueue/JobQueueRedis.php +++ b/includes/jobqueue/JobQueueRedis.php @@ -218,14 +218,15 @@ class JobQueueRedis extends JobQueue { $failed += count( $itemBatch ); } } - if ( $failed > 0 ) { - wfDebugLog( 'JobQueueRedis', "Could not insert {$failed} {$this->type} job(s)." ); - - throw new RedisException( "Could not insert {$failed} {$this->type} job(s)." ); - } JobQueue::incrStats( 'inserts', $this->type, count( $items ) ); + JobQueue::incrStats( 'inserts_actual', $this->type, $pushed ); JobQueue::incrStats( 'dupe_inserts', $this->type, count( $items ) - $failed - $pushed ); + if ( $failed > 0 ) { + $err = "Could not insert {$failed} {$this->type} job(s)."; + wfDebugLog( 'JobQueueRedis', $err ); + throw new RedisException( $err ); + } } catch ( RedisException $e ) { $this->throwRedisException( $conn, $e ); } @@ -301,7 +302,7 @@ LUA; break; // no jobs; nothing to do } - JobQueue::incrStats( 'job-pop', $this->type ); + JobQueue::incrStats( 'pops', $this->type ); $item = $this->unserialize( $blob ); if ( $item === false ) { wfDebugLog( 'JobQueueRedis', "Could not unserialize {$this->type} job." ); @@ -393,7 +394,7 @@ LUA; return false; } - JobQueue::incrStats( 'job-ack', $this->type ); + JobQueue::incrStats( 'acks', $this->type ); } catch ( RedisException $e ) { $this->throwRedisException( $conn, $e ); }