INNER CODE UNIT · Python

get_env_bool

rainmanjam/jobspy-api · app/main.py:50

def get_env_bool(var_name, default=True):
    val = os.getenv(var_name)
    if val is None:
        return default
    return str(val).lower() in ("1", "true", "yes", "on")

@asynccontextmanager
async def lifespan(app: FastAPI):
    # Startup: Initialize services, connections, etc.
    logger.info("Starting up JobSpy Docker API")
    
    # Log environment variables to help debugging
    log_environment_settings()
    
    # Yield control to the application
    yield
    
    # Shutdown: Clean up resources

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…