Deployment

File Locations

Configuration:
  /etc/dashboard/client-config.json
  /etc/dashboard/defaults-config.json

Code:
  dashboard/notifications/tts_api_notifier/

Tests:
  test/notifications/test_tts_api_notifier.py

Example Systemd Service (Linux)

Create /etc/systemd/system/tts-notifier.service:

[Unit]
Description=TTS API Notifier Service
After=network.target mariadb.service rabbitmq-server.service

[Service]
Type=simple
User=dashboard
WorkingDirectory=/opt/dashboard
ExecStart=/usr/local/bin/tts_api_notifier --client-config /etc/dashboard/client-config.json
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl enable tts-notifier
sudo systemctl start tts-notifier
sudo systemctl status tts-notifier

View logs:

sudo journalctl -u tts-notifier -f

Notes

  • Processing thread is a daemon - no graceful join needed

  • Database commits are handled by session_scope() context manager

  • Retry timers are tracked to prevent leaks

  • Configuration is validated at startup

  • Service class is dynamically loaded at runtime based on configuration

  • No assumptions about TTS implementation details