Fix hardcoded reference to admin container.

master
Richard Gomes 5 years ago committed by Dario Ernst
parent 4ab977a9f1
commit b414757ff8

@ -47,7 +47,7 @@ def fetchmail(fetchmailrc):
def run(debug): def run(debug):
try: try:
fetches = requests.get("http://admin/internal/fetch").json() fetches = requests.get("http://" + os.environ.get("HOST_ADMIN", "admin") + "/internal/fetch").json()
smtphost, smtpport = extract_host_port(os.environ.get("HOST_SMTP", "smtp"), None) smtphost, smtpport = extract_host_port(os.environ.get("HOST_SMTP", "smtp"), None)
if smtpport is None: if smtpport is None:
smtphostport = smtphost smtphostport = smtphost
@ -85,7 +85,7 @@ def run(debug):
user_info in error_message): user_info in error_message):
print(error_message) print(error_message)
finally: finally:
requests.post("http://admin/internal/fetch/{}".format(fetch["id"]), requests.post("http://" + os.environ.get("HOST_ADMIN", "admin") + "/internal/fetch/{}".format(fetch["id"]),
json=error_message.split("\n")[0] json=error_message.split("\n")[0]
) )
except Exception: except Exception:

Loading…
Cancel
Save