If we can't detect nginx's IP and we're bound to fail the task we don't need to go on.
This commit is contained in:
parent
9aa21088c5
commit
411996f784
|
@ -126,6 +126,10 @@ async def block_skylinks_from_airtable():
|
||||||
"docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nginx"
|
"docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nginx"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ipaddress == "":
|
||||||
|
print("Nginx's IP could not be detected. Exiting.")
|
||||||
|
return
|
||||||
|
|
||||||
print("Sending blocklist request to siad through nginx")
|
print("Sending blocklist request to siad through nginx")
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
"http://" + ipaddress + ":8000/skynet/blocklist",
|
"http://" + ipaddress + ":8000/skynet/blocklist",
|
||||||
|
|
Reference in New Issue