fixed writing to file
This commit is contained in:
parent
e816a33da1
commit
1762c7f7b7
|
@ -76,9 +76,8 @@ async def block_skylinks_from_airtable():
|
||||||
|
|
||||||
print("Searching nginx cache for blocked files")
|
print("Searching nginx cache for blocked files")
|
||||||
|
|
||||||
f = open("/tmp/blocklist-aritable.txt", "w")
|
print("Searching nginx cache for blocked files")
|
||||||
f.write("^KEY: .*" + "^KEY: .*\n".join(skylinks))
|
exec('printf "^KEY: .*' + '\n^KEY: .*'.join(skylinks) + '" > /tmp/blocklist-aritable.txt')
|
||||||
f.close()
|
|
||||||
cached_files_command = (
|
cached_files_command = (
|
||||||
"/usr/bin/find /data/nginx/cache/ -type f | /usr/bin/xargs --no-run-if-empty -n1000 /bin/grep -Els --file /tmp/blocklist-aritable.txt"
|
"/usr/bin/find /data/nginx/cache/ -type f | /usr/bin/xargs --no-run-if-empty -n1000 /bin/grep -Els --file /tmp/blocklist-aritable.txt"
|
||||||
)
|
)
|
||||||
|
|
Reference in New Issue