INNER CODE UNIT · Python

allow_custom_memory

hunvreus/devpush · app/config.py:86

    def allow_custom_memory(self) -> bool:
        return self.default_memory_mb is not None and self.max_memory_mb is not None


@lru_cache
def get_settings():
    settings = Settings()

    # Set URL scheme based on environment
    settings.url_scheme = "http" if settings.env == "development" else "https"

    # CPU default/max normalization
    if settings.default_cpus is not None and settings.default_cpus <= 0:
        logger.warning("DEFAULT_CPUS must be > 0; ignoring and treating as unlimited.")
        settings.default_cpus = None
    if settings.max_cpus is not None and settings.max_cpus <= 0:
        logger.warning("MAX_CPUS must be > 0; ignoring.")
        settings.max_cpus = None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…