From 73cf5b510e233328cd1e6caf299690fb6e1c3c8f Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Sun, 18 Jul 2021 09:10:54 +0200 Subject: [PATCH] improve --- setup-scripts/blocklist-airtable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-scripts/blocklist-airtable.py b/setup-scripts/blocklist-airtable.py index ff169a46..5cb4d14e 100755 --- a/setup-scripts/blocklist-airtable.py +++ b/setup-scripts/blocklist-airtable.py @@ -104,10 +104,10 @@ async def block_skylinks_from_airtable(): + ")'" ) cached_files_count = int(exec('docker exec -it nginx bash -c "' + cached_files_command + ' | wc -l"') or 0) + removed = int(exec('docker exec -it nginx bash -c "' + cached_files_command + ' | xargs -r rm -v | wc -l"')) + print(removed) if cached_files_count: total_cached_files_count+= cached_files_count - removed = int(exec('docker exec -it nginx bash -c "' + cached_files_command + ' | xargs -r rm -v | wc -l"')) - print(removed) if total_cached_files_count == 0: return print("No nginx cached files matching blocked skylinks were found")