This commit is contained in:
Karol Wypchlo 2021-07-18 09:10:54 +02:00
parent 52e5a345cf
commit 73cf5b510e
1 changed files with 2 additions and 2 deletions

View File

@ -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) 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: if cached_files_count:
total_cached_files_count+= 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: if total_cached_files_count == 0:
return print("No nginx cached files matching blocked skylinks were found") return print("No nginx cached files matching blocked skylinks were found")