MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / ready

Method ready

core/apps.py:23–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 name = 'core'
22
23 def ready(self):
24 # Import signals to ensure they get registered
25 import core.signals
26 from dispatcharr.app_initialization import should_skip_initialization
27
28 # Force UTC0 on every new DB connection.
29 from django.db.backends.signals import connection_created
30
31 def _force_utc0(sender, connection, **kwargs):
32 connection.cursor().execute("SET TIME ZONE 'UTC0'")
33
34 connection_created.connect(_force_utc0, dispatch_uid='force_db_utc0')
35
36 # Sync developer notifications and check for version updates on startup
37 # Only run in the main process (not in management commands, migrations, or workers)
38 if should_skip_initialization():
39 return
40
41 self._sync_developer_notifications()
42
43 def _sync_developer_notifications(self):
44 """Sync developer notifications from JSON file to database."""

Callers

nothing calls this directly

Calls 3

connectMethod · 0.80

Tested by

no test coverage detected