From 6c1b96606e697b2b0af114efe53752517017b357 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Sun, 18 Jul 2021 09:17:29 +0200 Subject: [PATCH] one less search --- setup-scripts/blocklist-airtable.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup-scripts/blocklist-airtable.py b/setup-scripts/blocklist-airtable.py index f26f1e73..8b0d9705 100755 --- a/setup-scripts/blocklist-airtable.py +++ b/setup-scripts/blocklist-airtable.py @@ -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")