"""
Streams Application Configuration

This module defines the configuration for the streams Django application,
which handles stream capture, processing, HLS playlist management,
and video/audio encoding operations.
"""

from django.apps import AppConfig


class StreamsConfig(AppConfig):
    """
    Configuration class for the streams application.
    
    This class defines the streams application settings and handles
    application initialization, including setting up signal handlers
    for stream monitoring and automatic cleanup tasks.
    
    Attributes:
        default_auto_field (str): The default primary key field type for models
        name (str): The application name used by Django
        verbose_name (str): Human-readable name for the application
    """
    
    # Use BigAutoField as the default primary key type
    default_auto_field = 'django.db.models.BigAutoField'
    
    # Application name as registered in Django
    name = 'apps.streams'
    
    # Human-readable application name
    verbose_name = 'Stream Management'
    
    def ready(self):
        """
        Perform initialization when the application is ready.
        
        This method is called once Django has loaded all applications
        and models. It imports signal handlers to set up automatic
        stream monitoring and cleanup processes.
        """
        # Import signal handlers for stream monitoring
        try:
            import apps.streams.signals  # noqa: F401
        except ImportError:
            # Signal handlers are optional
            pass
