Florian b272e069d4 Unified logging behaviour
- Logger doesn't start with log level DEBUG by default, instead reads a environment variable
- Added extensive debug logging
- Wrote a readme
- Changed database healthcheck loop to only catch pymsql errors
2025-10-17 10:58:37 +02:00

775 B

Backend Push Notifications

Overview

This part of the backend handles device push notifications for registered users. It consumes messages from RabbitMQ, looks up user device tokens from a MySQL database, and sends notifications via Expo's API. Failed deliveries are retried or sent to a dead-letter queue.

Requirements

  • Python 3.12+
  • MySQL database
  • RabbitMQ
  • Python packages from requirements.txt

Configuration

Environment variables:

  • LOG_LEVEL (DEBUG, INFO, WARNING, ERROR, CRITICAL)

  • RABBITMQ_URL

  • MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE

  • API_ENDPOINT (Expo push API)

Metrics

Metrics are exposed on port 9000 for Prometheus, including:

  • MSG_PUBLISHED

  • MSG_FAILED

  • MSG_RETRY

  • Queue sizes