dokku-comp
This commit is contained in:
@@ -10,8 +10,9 @@ storage = Redis.from_url(REDIS_URL)
|
||||
# хранение необходимой информации о пользователях
|
||||
Profile = ProfileObj(storage)
|
||||
|
||||
|
||||
# достаёт из хранилища jsonы по маске и количеству
|
||||
def scan(match='usr-*', count=100):
|
||||
def scan(match="usr-*", count=100):
|
||||
cursor = 0
|
||||
keys = []
|
||||
r = storage
|
||||
@@ -27,9 +28,9 @@ def scan(match='usr-*', count=100):
|
||||
# Parse the JSON data from each value
|
||||
items = []
|
||||
for value in values:
|
||||
value_str = value.decode('utf-8')
|
||||
value_str = value.decode("utf-8")
|
||||
i = json.loads(value_str)
|
||||
items.append(i)
|
||||
print(f'scan found {len(items)} items')
|
||||
print(f"scan found {len(items)} items")
|
||||
|
||||
return keys, items
|
||||
return keys, items
|
||||
|
Reference in New Issue
Block a user