Skip to content

Commit

Permalink
Fix keys stats bug + force php-redis version
Browse files Browse the repository at this point in the history
  • Loading branch information
sasanrose committed Nov 16, 2016
1 parent 2555a59 commit 8149a1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
logs/
README.md
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y \
gearman-job-server \
git-core \
libgearman-dev \
redis-tools \
&& pecl install gearman \
&& docker-php-ext-enable gearman

Expand All @@ -24,7 +25,9 @@ WORKDIR /usr/src

RUN git clone https://github.com/phpredis/phpredis.git
WORKDIR /usr/src/phpredis
RUN phpize \
# Version 3 has a bug with zAdd so checkout to 2.2.8
RUN git checkout tags/2.2.8 \
&& phpize \
&& ./configure \
&& make \
&& make install \
Expand Down
2 changes: 1 addition & 1 deletion controllers/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function indexAction()
}

foreach ($this->infoModel->getDbs($info) as $i) {
if (preg_match('/^keys=([0-9]+),expires=([0-9]+)$/', $info["db{$i}"], $matches)) {
if (preg_match('/keys=([0-9]+),expires=([0-9]+)/', $info["db{$i}"], $matches)) {
$statsModel->addKey("db{$i}:keys", $matches[1], $time);
$statsModel->addKey("db{$i}:expired_keys", $matches[2], $time);
}
Expand Down

0 comments on commit 8149a1e

Please sign in to comment.