Example #1
0
    def get_follows(self, user, user2=None, msg=None):
        follows = redis_db.smembers('%s:%s' % (FOLLOWS_KEY, user))
        blocked = redis_db.smembers('%s:%s' % (BLOCKED_KEY, user))

        ret = list(follows.difference(blocked))
        app.logger.debug("get_follows:[%s],[ret:%s]" % (user, ret))
        return ret
Example #2
0
 def get_friends(self, user, user2=None, msg=None):
     return list(redis_db.smembers('%s:%s' % (FRIENDS_KEY, user)))
Example #3
0
 def get_blocked(self, user, user2=None, msg=None):
     return list(redis_db.smembers('%s:%s' % (BLOCKED_KEY, user)))