one less search

This commit is contained in:
Karol Wypchlo 2021-07-18 09:17:29 +02:00
parent 7c9d1debd2
commit 6c1b96606e
1 changed files with 3 additions and 1 deletions

View File

@ -103,7 +103,9 @@ async def block_skylinks_from_airtable():
+ "|".join(skylinks[i:i+1000])
+ ")'"
)
cached_files_count+= int(exec('docker exec -it nginx bash -c "' + cached_files_command + ' | xargs -r rm -v | wc -l"'))
output = exec('docker exec -it nginx bash -c "' + cached_files_command + ' | xargs -r rm -v | wc -l"')
print(output)
cached_files_count+= int(output)
if cached_files_count == 0:
return print("No nginx cached files matching blocked skylinks were found")