Beispiel #1
0
def flush_user_factor(redis_db):
    key_pattern = '/alg/math/user_factor/*'
    keys = redis_scan(redis_db, key_pattern)
    pipe = redis_db.pipeline()
    for key in keys:
        pipe.delete(key)
    pipe.execute()
Beispiel #2
0
 def flush_user_factor(self):
     key_pattern = '/alg/%s/user_factor/*' % self.subject_name
     keys = redis_scan(redis_db, key_pattern)
     pipe = self.redis_db.pipeline()
     for key in keys:
         pipe.delete(key)
     pipe.execute()
Beispiel #3
0
def flush_user_factor(redis_db):
    key_pattern = '/alg/math/user_factor/*'
    keys = redis_scan(redis_db, key_pattern)
    pipe = redis_db.pipeline()
    for key in keys:
        pipe.delete(key)
    pipe.execute()