Include job attempt count for redis in showJobs.php
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 21 Aug 2015 20:09:14 +0000 (13:09 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 21 Aug 2015 20:09:14 +0000 (13:09 -0700)
Change-Id: I791f1520c6d8aed6f8c4c4f09c5f72b130a00a4d

includes/jobqueue/JobQueueRedis.php

index 1b1a193..29c8068 100644 (file)
@@ -613,6 +613,8 @@ LUA;
                        $job = Job::factory( $item['type'], $title, $item['params'] );
                        $job->metadata['uuid'] = $item['uuid'];
                        $job->metadata['timestamp'] = $item['timestamp'];
+                       // Add in attempt count for debugging at showJobs.php
+                       $job->metadata['attempts'] = $conn->hGet( $this->getQueueKey( 'h-attempts' ), $uid );
 
                        return $job;
                } catch ( RedisException $e ) {