Skip to content

Commit

Permalink
Merge pull request #359 from DNO-inc/improve_auth_logs
Browse files Browse the repository at this point in the history
additional logging for email loop
  • Loading branch information
m-o-d-e-r authored Jun 6, 2024
2 parents 7de2e97 + 239abea commit 6611996
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion burrito/apps/notifications/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def email_loop():
raw_data = message.get("data")

if raw_data and isinstance(raw_data, (str, bytes)):
get_logger().info(f"Found such data in the chanel: {raw_data}")
try:
data = orjson.loads(raw_data)
except UnboundLocalError as exc:
Expand All @@ -37,6 +36,7 @@ def email_loop():
send_email,
**data
)
get_logger().info("New task started...")

else:
get_logger().info("No messages")
Expand Down
1 change: 1 addition & 0 deletions burrito/utils/email_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def send_email(receivers: list[int], subject: str, content: str) -> None:
"""
receivers_email: list[str] = []

get_logger().info("Preparing for sending email")
for id_ in receivers:
current_user: Users = get_user_by_id_or_none(id_)

Expand Down

0 comments on commit 6611996

Please sign in to comment.