mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2025-12-06 06:21:36 +01:00
fix: output downtime after reading args
This commit is contained in:
@@ -347,11 +347,6 @@ def smart_send_to_clients(path=None):
|
|||||||
- supported struct of type "ICINGA|ZABBIX|GENERIC" (see docs) in field "data"
|
- supported struct of type "ICINGA|ZABBIX|GENERIC" (see docs) in field "data"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if app.config["DOWNTIME"] > datetime.datetime.now():
|
|
||||||
print("Ignoring because of Downtime:", title, message, user)
|
|
||||||
print("Downtime until", app.config["DOWNTIME"].isoformat())
|
|
||||||
return ("Ignored because of Downtime", 200)
|
|
||||||
|
|
||||||
instructions = flask.request.json
|
instructions = flask.request.json
|
||||||
|
|
||||||
users = instructions.get("users")
|
users = instructions.get("users")
|
||||||
@@ -360,6 +355,11 @@ def smart_send_to_clients(path=None):
|
|||||||
title = instructions.get("title")
|
title = instructions.get("title")
|
||||||
method = instructions.get("method")
|
method = instructions.get("method")
|
||||||
|
|
||||||
|
if app.config["DOWNTIME"] > datetime.datetime.now():
|
||||||
|
print("Ignoring because of Downtime:", title, message, user)
|
||||||
|
print("Downtime until", app.config["DOWNTIME"].isoformat())
|
||||||
|
return ("Ignored because of Downtime", 200)
|
||||||
|
|
||||||
# authenticated by access token or webhook path #
|
# authenticated by access token or webhook path #
|
||||||
dispatch_acces_token = flask.request.args.get("dispatch-access-token") or ""
|
dispatch_acces_token = flask.request.args.get("dispatch-access-token") or ""
|
||||||
print(path)
|
print(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user