Log number of pushes which were already cached

This commit is contained in:
Marco Castelluccio 2019-10-18 12:43:18 +01:00
Родитель aafa851645
Коммит 3b0d0fe9a6
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -35,10 +35,13 @@ def run(args):
header
]
num_cached = 0
for push in tqdm(pushes):
key = f"push_data.{push.rev}"
if config.cache.has(key):
num_cached += 1
data.append(config.cache.get(key))
else:
try:
@ -57,4 +60,6 @@ def run(args):
logger.error(e)
continue
logger.info(f"{num_cached} pushes were already cached out of {len(pushes)}")
return data