Dispatcharr/apps/m3u
None c841cfc8fc Fix #861: Prevent M3U endless downloading caused by Redis lock expiry
Large M3U downloads that exceed the 300s Redis lock TTL caused Celery Beat
to re-queue duplicate tasks, creating overlapping downloads that never complete.

Files changed:

- core/utils.py: Add TaskLockRenewer class — a daemon thread that periodically renews Redis lock TTL (every 120s) to prevent expiry during long-running tasks.

- apps/m3u/tasks.py: Apply TaskLockRenewer to refresh_single_m3u_account and refresh_m3u_groups; add HTTP timeout (30s connect, 60s read) to M3U download (the only download path missing one); stream M3U download to disk instead of accumulating in memory; add Celery task time limits (1 hour hard limit).

- apps/epg/tasks.py: Apply TaskLockRenewer to refresh_epg_data and parse_programs_for_tvg_id; add Celery task time limits (30 min / 1 hour).

Verified with a throttled test server: locks renewed at T+120s, T+240s, T+360s; 50,000 streams processed with no duplicate tasks.
2026-02-23 00:34:28 -06:00
..
migrations Add custom properties to M3UAccountProfile and implement account info retrieval 2025-09-09 16:05:58 -05:00
__init__.py Initial commit 2025-02-18 11:14:09 -06:00
admin.py Add custom properties to M3UAccountProfile and implement account info retrieval 2025-09-09 16:05:58 -05:00
api_urls.py Ability to refresh account info from account info modal and provide notification on results. 2025-09-09 18:15:33 -05:00
api_views.py feat(scheduling): add cron builder and refactor scheduling components (Closes #165) 2026-02-12 18:08:13 -06:00
apps.py Initial commit 2025-02-18 11:14:09 -06:00
forms.py Convert custom_properties to jsonb in the backend. 2025-09-02 09:41:51 -05:00
models.py Add custom properties to M3UAccountProfile and implement account info retrieval 2025-09-09 16:05:58 -05:00
serializers.py feat(scheduling): add cron builder and refactor scheduling components (Closes #165) 2026-02-12 18:08:13 -06:00
signals.py feat(scheduling): add cron builder and refactor scheduling components (Closes #165) 2026-02-12 18:08:13 -06:00
tasks.py Fix #861: Prevent M3U endless downloading caused by Redis lock expiry 2026-02-23 00:34:28 -06:00
urls.py Initial commit 2025-02-18 11:14:09 -06:00
utils.py Enhancement: Adds support for UDP streams. Closes #617 2025-11-11 18:30:59 -06:00
views.py Add ability to scan for vods during m3u refresh. 2025-08-02 12:01:26 -05:00