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

Function _release_task_db_connection

apps/epg/tasks.py:48–51  ·  view source on GitHub ↗

Return the Celery worker's DB connection to a clean state after ORM errors.

()

Source from the content-addressed store, hash-verified

46
47
48def _release_task_db_connection():
49 """Return the Celery worker's DB connection to a clean state after ORM errors."""
50 from django.db import close_old_connections
51 close_old_connections()
52
53
54def _db_query_with_retry(fn, *, label="DB query", max_retries=2):

Callers 4

_db_query_with_retryFunction · 0.70
_set_epg_source_statusFunction · 0.70
refresh_epg_dataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected