maple.utils.cleanup

Resource cleanup utilities.

This module provides automatic cleanup management for Docker containers and other resources. It ensures proper cleanup when: - Program exits normally - Program crashes - User presses Ctrl+C (SIGINT) - SIGTERM is received

Classes

CleanupManager()

Singleton manager for automatic resource cleanup.

Functions

cleanup_all()

Manually trigger cleanup of all resources.

register_cleanup_handler(name, handler)

Register a custom cleanup handler.

register_container(container_id[, name])

Register a container for automatic cleanup.

unregister_container(container_id)

Unregister a container from automatic cleanup.