How pluggnkey/messagesnotifier works
This Django service turns Google Sheets duty, vacation, and release schedules into date-specific assignments, then sends scheduled Slack notifications and exposes duty data and management through REST endpoints. Its main path is scheduler or API entry → DataDutyService → sheet retrieval and normalization → duty maps with vacation substitutions and Kazakhstan holidays → formatted messages or API responses. The README also describes monthly weekend reports and CRUD. Some of those capabilities are documented but their full implementation was not sampled; edges are limited to visible references or README statements.
Main entry points: service.py Duty service · health_check_services.py Health checks · google_client.py Sheets client · slack_service.py Slack client
Components 22
Entry points
- Notification scheduler
src/apps/duties/scheduler/total_scheduler.py - REST API
src/apps/duties/views.py
Duty processing
- Duty service
src/apps/duties/services/service.py - Data cleanup
src/apps/duties/services/clear_data_google.py - Duty maps and substitutions
src/apps/duties/services/data_duty.py - Name transliteration
src/apps/duties/services/transliteration.py - Message formatter
src/apps/duties/services/messages_formatter.py - Message handler
src/apps/duties/services/message_handler.py
External integrations
- Sheets client
src/apps/duties/services/google_client.py - Kazakhstan holidays
src/apps/duties/services/kz_calendar_service.py - Slack client
src/apps/duties/services/slack_service.py - Telegram client
src/apps/duties/services/telegram_integration.py
Monitoring and resilience
- Health checks
src/apps/duties/services/health_check_services.py - Telegram health status
src/apps/duties/services/telegram_health_status.py - Technical break monitor
src/apps/duties/services/technical_break_settings.py - Retry and backoff
src/apps/duties/services/retry_client.py - Circuit breaker
src/apps/duties/services/circuit_breaker.py
Other components
- Google Sheets
- Slack
- Holiday calendar API
- Telegram
- API caller
Connections 29
- Notification scheduler → Duty service: schedules calls
src/apps/duties/scheduler/total_scheduler.py - REST API → Duty service: requests duty data
src/apps/duties/views.py - REST API → Sheets client: updates sheet data
src/apps/duties/views.py - API caller → REST API: requests endpoints
README.md - Duty service → Sheets client: loads sheet data
src/apps/duties/services/service.py - Sheets client → Google Sheets: reads and updates
src/apps/duties/services/google_client.py - Duty service → Data cleanup: cleans sheet data
src/apps/duties/services/service.py - Duty service → Duty maps and substitutions: builds duty maps
src/apps/duties/services/service.py - Duty service → Name transliteration: normalizes names
src/apps/duties/services/service.py - Duty maps and substitutions → Name transliteration: uses name mapping
src/apps/duties/services/data_duty.py - Duty service → Kazakhstan holidays: loads holidays
src/apps/duties/services/service.py - Kazakhstan holidays → Holiday calendar API: fetches calendar
src/apps/duties/services/kz_calendar_service.py - Duty service → Slack client: gets user IDs
src/apps/duties/services/service.py - Slack client → Slack: queries members
src/apps/duties/services/slack_service.py - Duty service → Message handler: prepares messages
src/apps/duties/services/service.py - Message handler → Duty service: requests duty data
src/apps/duties/services/message_handler.py - Duty service → Message formatter: formats results
src/apps/duties/services/service.py - Notification scheduler → Telegram client: schedules alerts
- Telegram client → Telegram: sends messages
src/apps/duties/services/telegram_integration.py - Health checks → Sheets client: checks connection
src/apps/duties/services/health_check_services.py - Health checks → Slack client: checks connection
src/apps/duties/services/health_check_services.py - Health checks → Kazakhstan holidays: checks availability
src/apps/duties/services/health_check_services.py - Health checks → Telegram client: checks connection
src/apps/duties/services/health_check_services.py - Telegram health status → Health checks: reports status
src/apps/duties/services/telegram_health_status.py - Technical break monitor → Notification scheduler: monitors schedule
src/apps/duties/services/technical_break_settings.py - Sheets client → Retry and backoff: retries requests
src/apps/duties/services/google_client.py - Slack client → Retry and backoff: retries requests
src/apps/duties/services/slack_service.py - Telegram client → Retry and backoff: retries requests
src/apps/duties/services/telegram_integration.py - Duty service → Circuit breaker: uses protection
src/apps/duties/services/service.py