Add note to sync changes in blocklist scripts

This commit is contained in:
Filip Rysavy 2021-10-26 09:49:03 +02:00
parent ec02e9afa2
commit 838c2084a9
No known key found for this signature in database
GPG Key ID: EA1F430401C92D99
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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