INNER CODE UNIT · Python

shutdown_event

agentscope-ai/agentscope-runtime · src/agentscope_runtime/sandbox/manager/server/app.py:220

async def shutdown_event():
    """Cleanup resources on shutdown"""
    global _sandbox_manager
    settings = get_settings()
    if not _sandbox_manager:
        return

    # stop watcher first
    _sandbox_manager.stop_watcher()

    if settings.AUTO_CLEANUP:
        _sandbox_manager.cleanup()

    _sandbox_manager = None


@app.get(
    "/health",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…