Compare commits

...

2 Commits

Author SHA1 Message Date
f3903b3936 feat: minimal logging for debugging server & fix import
All checks were successful
ci / docker (push) Successful in 1m13s
2026-03-28 22:17:16 +01:00
39f795bbb6 feat: minimal logging for debugging 2026-03-28 22:12:29 +01:00
2 changed files with 5 additions and 1 deletions

View File

@@ -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":

View File

@@ -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: