From 52e5a345cf6a53e73c8179688edefd1c6187300c Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Sun, 18 Jul 2021 09:09:55 +0200 Subject: [PATCH] improve --- setup-scripts/blocklist-airtable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup-scripts/blocklist-airtable.py b/setup-scripts/blocklist-airtable.py index eb835955..ff169a46 100755 --- a/setup-scripts/blocklist-airtable.py +++ b/setup-scripts/blocklist-airtable.py @@ -106,7 +106,8 @@ async def block_skylinks_from_airtable(): cached_files_count = int(exec('docker exec -it nginx bash -c "' + cached_files_command + ' | wc -l"') or 0) if cached_files_count: total_cached_files_count+= cached_files_count - exec('docker exec -it nginx bash -c "' + cached_files_command + ' | xargs rm"') + 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")