How pluggnkey/-slackgoogledutynotifications works
Duty Slack Notification Service reads weekday, weekend, vacation, and release schedules from Google Sheets, resolves assignments and substitutions, and returns duty data through a REST API or sends scheduled Slack notifications. The main flow is Django views or the scheduler into DataDutyService, then sheet retrieval, cleanup, holiday-aware assignment mapping, and response or message delivery. The README documents additional monthly/weekend and vacation workflows; sampled code confirms scheduler, API, Google, and Slack ownership, while some internal transformations are only partially excerpted.
Main entry points: service.py Duty service · google_client.py Google reader · views.py REST views · slack_service.py Slack messaging
Components 19
Entry points
- Django routes
src/config/urls.py - REST views
src/apps/duties/views.py - Duty scheduler
src/apps/duties/scheduler/total_scheduler.py - App startup
src/apps/duties/apps.py
Duty processing
- Duty service
src/apps/duties/services/service.py - Sheet cleanup
src/apps/duties/services/clear_data_google.py - Duty substitutions
src/apps/duties/services/data_duty.py - Name matching
src/apps/duties/services/transliteration.py - Holiday calendar
src/apps/duties/services/kz_calendar_service.py
External integrations
- Google reader
src/apps/duties/services/google_client.py - Google CRUD
src/apps/duties/services/google_client.py - Django cache
src/config/settings.py
Notification delivery
- Message formatting
src/apps/duties/services/service.py - Slack messaging
src/apps/duties/services/slack_service.py
Other components
- API caller
- Cron timer
- Google Sheets
- Slack
- Holiday API
Connections 28
- API caller → Django routes: requests
- Django routes → REST views: dispatches
- REST views → Duty service: requests data
- REST views → Google CRUD: CRUD requests
- REST views → Google reader: refreshes cache
- Cron timer → Duty scheduler: triggers jobs
- App startup → Google reader: warms cache
- App startup → Duty scheduler: starts
- Duty scheduler → Duty service: checks vacation
- Duty scheduler → Slack messaging: dispatches jobs
- Duty service → Google reader: loads schedules
- Google reader → Google Sheets: reads sheets
- Google reader → Django cache: reads/writes cache
- Google CRUD → Google Sheets: updates rows
- Google CRUD → Django cache: refreshes cache
- Duty service → Sheet cleanup: cleans data
- Duty service → Duty substitutions: builds assignments
- Duty service → Name matching: matches names
- Duty service → Holiday calendar: checks holidays
- Holiday calendar → Holiday API: fetches holidays
- Holiday calendar → Django cache: reads/writes cache
- Duty service → Message formatting: formats notifications
- Message formatting → Duty service: gets duty data
- Slack messaging → Message formatting: builds messages
- Slack messaging → Slack: sends messages
- Slack messaging → Django cache: reads/writes cache
- Duty service → Slack: fetches member names
- Duty service → Google CRUD: updates assignments