mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2026-04-26 15:32:28 +02:00
Compare commits
2 Commits
f468a789e3
...
f3903b3936
| Author | SHA1 | Date | |
|---|---|---|---|
| f3903b3936 | |||
| 39f795bbb6 |
@@ -9,6 +9,7 @@ import requests
|
|||||||
import re
|
import re
|
||||||
import smtphelper
|
import smtphelper
|
||||||
import json
|
import json
|
||||||
|
import datetime
|
||||||
|
|
||||||
HTTP_NOT_FOUND = 404
|
HTTP_NOT_FOUND = 404
|
||||||
|
|
||||||
@@ -211,6 +212,8 @@ if __name__ == "__main__":
|
|||||||
email_address = entry.get("email")
|
email_address = entry.get("email")
|
||||||
|
|
||||||
# send message #
|
# send message #
|
||||||
|
print(f"Sending: {method} {hash(str(title))} @ {datetime.datetime.now()}",
|
||||||
|
file=sys.stderr)
|
||||||
if method == "signal":
|
if method == "signal":
|
||||||
pass
|
pass
|
||||||
elif method == "ntfy":
|
elif method == "ntfy":
|
||||||
|
|||||||
@@ -352,7 +352,6 @@ def smart_send_to_clients(path=None):
|
|||||||
if not dispatch_acces_token:
|
if not dispatch_acces_token:
|
||||||
dispatch_acces_token = flask.request.headers.get("Dispatcher-Token") or ""
|
dispatch_acces_token = flask.request.headers.get("Dispatcher-Token") or ""
|
||||||
|
|
||||||
print(path)
|
|
||||||
if path:
|
if path:
|
||||||
webhook_path = db.session.query(WebHookPaths).filter(WebHookPaths.path==path).first()
|
webhook_path = db.session.query(WebHookPaths).filter(WebHookPaths.path==path).first()
|
||||||
if webhook_path:
|
if webhook_path:
|
||||||
@@ -387,6 +386,8 @@ def smart_send_to_clients(path=None):
|
|||||||
|
|
||||||
def save_in_dispatch_queue(persons, title, message, method, link=""):
|
def save_in_dispatch_queue(persons, title, message, method, link=""):
|
||||||
|
|
||||||
|
now_str = str(datetime.datetime.now())
|
||||||
|
print(f"Scheduling message to {abs(hash(str(persons)))} @ {now_str}", file=sys.stderr)
|
||||||
|
|
||||||
dispatch_secrets = []
|
dispatch_secrets = []
|
||||||
for p in persons:
|
for p in persons:
|
||||||
|
|||||||
Reference in New Issue
Block a user