Example #1
0
def publish_to_char(char_id, msg):
    redis_client.rpush('noti:{0}'.format(char_id), msg)
Example #2
0
    def put(cls, data):
        while redis_client.llen(cls.REDIS_KEY) >= cls.QUEUE_SIZE:
            redis_client.lpop(cls.REDIS_KEY)

        redis_client.rpush(cls.REDIS_KEY, data)
Example #3
0
def publish_to_char(char_id, msg):
    redis_client.rpush('noti:{0}'.format(char_id), msg)
Example #4
0
def publish_to_char(char_id, msg):
    key = keygen(char_id)
    redis_client.rpush(key, msg)
    redis_client.expire(key, EXPIRE)
Example #5
0
def publish_to_char(char_id, msg):
    key = keygen(char_id)
    redis_client.rpush(key, msg)
    redis_client.expire(key, EXPIRE)
Example #6
0
    def put(cls, data):
        while redis_client.llen(cls.REDIS_KEY) >= cls.QUEUE_SIZE:
            redis_client.lpop(cls.REDIS_KEY)

        redis_client.rpush(cls.REDIS_KEY, data)