def add_counter(self, stat_key, time, value): stat_counter = StatCounter(stat_key, time) with redis_pipeline(self.redis_client) as pipe: stat_counter.incr(pipe, value)
def add_counter(self, redis, stat_key, time, value): stat_counter = StatCounter(stat_key, time) with redis_pipeline(redis) as pipe: stat_counter.incr(pipe, value)