From 838c2084a936a5084daf526b089853387b1be19e Mon Sep 17 00:00:00 2001 From: Filip Rysavy <29089732+firyx@users.noreply.github.com> Date: Tue, 26 Oct 2021 09:49:03 +0200 Subject: [PATCH] Add note to sync changes in blocklist scripts --- scripts/blocklist-skylink.sh | 5 ++++- setup-scripts/blocklist-airtable.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/blocklist-skylink.sh b/scripts/blocklist-skylink.sh index 8116263a..8b81e09f 100755 --- a/scripts/blocklist-skylink.sh +++ b/scripts/blocklist-skylink.sh @@ -42,7 +42,10 @@ do docker exec sia siac skynet blocklist add "${skylink}" # Remove from NGINX cache - # NOTE: If there are changes to how the NGINX cache is being cleared, the same changes need to be applied to the /setup-scripts/blocklist-airtable.py script. + # NOTE: + # If there are changes to how the NGINX cache is being cleared, the same + # changes need to be applied to the /setup-scripts/blocklist-airtable.py + # script. cached_files_command="find /data/nginx/cache/ -type f | xargs -r grep -Els '^Skynet-Skylink: ${skylink}'" docker exec -it nginx bash -c "${cached_files_command}" | xargs -r rm diff --git a/setup-scripts/blocklist-airtable.py b/setup-scripts/blocklist-airtable.py index 1d4c28ce..3dbce3ed 100755 --- a/setup-scripts/blocklist-airtable.py +++ b/setup-scripts/blocklist-airtable.py @@ -141,6 +141,10 @@ async def block_skylinks_from_airtable(): ) return await send_msg(message, force_notify=False) + # Remove from NGINX cache + # NOTE: + # If there are changes to how the NGINX cache is being cleared, the same + # changes need to be applied to the /scripts/blocklist-skylink.sh script. print("Searching nginx cache for blocked files") cached_files_count = 0 batch_size = 1000