from django.apps import AppConfig
import logging

logger = logging.getLogger(__name__)


class DeviceInteractionConfig(AppConfig):
    default_auto_field = "django.db.models.BigAutoField"
    name = "device_interaction"

    def ready(self):
        from .scheduler import start
        try:
            start()
        except Exception as e:
            logger.error(f"Error starting device online check scheduler: {e}")
