From 47ce0ee3e73ee2dda4d56f181b4720f076124c32 Mon Sep 17 00:00:00 2001 From: Martijn Vermaat <martijn@vermaat.name> Date: Fri, 16 Oct 2015 14:06:32 +0200 Subject: [PATCH] Clarify Redis client import in stats module --- mutalyzer/stats.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mutalyzer/stats.py b/mutalyzer/stats.py index d8499f12..e901f679 100644 --- a/mutalyzer/stats.py +++ b/mutalyzer/stats.py @@ -21,7 +21,7 @@ from __future__ import unicode_literals import time -from mutalyzer.redisclient import client +from .redisclient import client as redis # Label, bucket definition, expiration time in seconds. @@ -34,7 +34,7 @@ def increment_counter(counter): """ Increment the specified counter. """ - pipe = client.pipeline(transaction=False) + pipe = redis.pipeline(transaction=False) pipe.incr('counter:%s:total' % counter) for label, bucket, expire in INTERVALS: @@ -56,9 +56,9 @@ def get_totals(): Known counters are just those that have been incremented at least once. """ - counters = client.keys('counter:*:total') + counters = redis.keys('counter:*:total') - pipe = client.pipeline(transaction=False) + pipe = redis.pipeline(transaction=False) for counter in counters: pipe.get(counter) -- GitLab