mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Removed cleanup from celery task.
This commit is contained in:
parent
55089044fa
commit
422bd0577a
1 changed files with 0 additions and 10 deletions
|
|
@ -2,7 +2,6 @@
|
|||
from celery import shared_task
|
||||
from channels.layers import get_channel_layer
|
||||
from asgiref.sync import async_to_sync
|
||||
import redis
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
|
|
@ -47,11 +46,6 @@ def throttled_log(logger_method, message, key=None, *args, **kwargs):
|
|||
logger_method(message, *args, **kwargs)
|
||||
_last_log_times[key] = now
|
||||
|
||||
def clear_memory():
|
||||
"""Force aggressive garbage collection to free memory"""
|
||||
from core.utils import cleanup_memory
|
||||
cleanup_memory(log_usage=True, force_collection=True)
|
||||
|
||||
@shared_task
|
||||
def beat_periodic_task():
|
||||
fetch_channel_stats()
|
||||
|
|
@ -275,9 +269,6 @@ def scan_and_process_files():
|
|||
# Mark that the first scan is complete
|
||||
_first_scan_completed = True
|
||||
|
||||
# Force memory cleanup
|
||||
clear_memory()
|
||||
|
||||
def fetch_channel_stats():
|
||||
redis_client = RedisClient.get_client()
|
||||
|
||||
|
|
@ -314,7 +305,6 @@ def fetch_channel_stats():
|
|||
|
||||
# Explicitly clean up large data structures
|
||||
all_channels = None
|
||||
gc.collect()
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error in channel_status: {e}", exc_info=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue