Added healtchecks on startup
This commit is contained in:
parent
7574a9d356
commit
878719260d
3
app.py
3
app.py
|
@ -199,6 +199,9 @@ if __name__ == "__main__":
|
||||||
res = requests.get(base_url_event, headers=headers)
|
res = requests.get(base_url_event, headers=headers)
|
||||||
res = res.json()
|
res = res.json()
|
||||||
if(res['slug'] == EVENT_NAME):
|
if(res['slug'] == EVENT_NAME):
|
||||||
|
print("Healtchecking...", file=sys.stderr)
|
||||||
|
res = requests.get(join(domain, "healthcheck"), headers=headers)
|
||||||
|
if(res.status_code == 200):
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -7,7 +7,8 @@ EVENT_NAME = 'overlord'
|
||||||
HOSTNAME = 'reg.furizon.net'
|
HOSTNAME = 'reg.furizon.net'
|
||||||
|
|
||||||
headers = {'Host': HOSTNAME, 'Authorization': f'Token {API_TOKEN}'}
|
headers = {'Host': HOSTNAME, 'Authorization': f'Token {API_TOKEN}'}
|
||||||
base_url = "http://urlllllllllllllllllllll/api/v1/"
|
domain = "http://urlllllllllllllllllllll/"
|
||||||
|
base_url = "{domain}api/v1/"
|
||||||
base_url_event = f"{base_url}organizers/{ORGANIZER}/events/{EVENT_NAME}/"
|
base_url_event = f"{base_url}organizers/{ORGANIZER}/events/{EVENT_NAME}/"
|
||||||
|
|
||||||
PROPIC_DEADLINE = 9999999999
|
PROPIC_DEADLINE = 9999999999
|
||||||
|
|
Loading…
Reference in New Issue