Initialize backup scheduler on app startup.
(self)
| 11 | verbose_name = "Backups" |
| 12 | |
| 13 | def ready(self): |
| 14 | """Initialize backup scheduler on app startup.""" |
| 15 | from dispatcharr.app_initialization import should_skip_initialization |
| 16 | |
| 17 | # Skip if this is a management command, worker process, or dev server |
| 18 | if should_skip_initialization(): |
| 19 | return |
| 20 | |
| 21 | logger.debug("Syncing backup scheduler on app startup") |
| 22 | self._sync_backup_scheduler() |
| 23 | |
| 24 | def _sync_backup_scheduler(self): |
| 25 | """Sync backup scheduler task to database.""" |
no test coverage detected