0.12.35 fix webpush

This commit is contained in:
SDE
2024-04-15 17:19:12 +03:00
parent fd70e388a7
commit 698f4578fc
3 changed files with 41 additions and 8 deletions

View File

@@ -126,12 +126,23 @@ def search_matches(for_routes=None):
if found_routes:
msg = f'found routes for send messages = {found_routes.count()}'
data_Dict = get_Dict_for_send_msgs(params, found_routes[0].owner_type)
msg = send_push_message_for_found_matches_routes(route, data_Dict)
if msg:
try:
data_Dict = get_Dict_for_send_msgs(params, found_routes[0].owner_type)
msg = send_push_message_for_found_matches_routes(route, data_Dict)
if msg:
log += msg
except Exception as e:
msg = f'<br>\n! search_matches Error send_push_message_for_found_matches_routes = {str(e)}'
print(msg)
log += msg
msg = send_mail_found_matches_routes(route, data_Dict)
if msg:
try:
msg = send_mail_found_matches_routes(route, data_Dict)
if msg:
log += msg
except Exception as e:
msg = f'<br>\n! search_matches Error send_mail_found_matches_routes = {str(e)}'
print(msg)
log += msg
except Exception as e: