MCPcopy Create free account
hub / github.com/FastLED/FastLED / cleanup_container

Function cleanup_container

ci/docker_utils/container_db.py:586–608  ·  view source on GitHub ↗

Clean up container registration but keep container alive. This function implements the cleanup phase: - Removes container from database - Leaves container running for debugging Args: container_id: Container ID to clean up db: Database instance (creates new if None)

(
    container_id: str, db: Optional[ContainerDatabase] = None
)

Source from the content-addressed store, hash-verified

584
585
586def cleanup_container(
587 container_id: str, db: Optional[ContainerDatabase] = None
588) -> None:
589 """Clean up container registration but keep container alive.
590
591 This function implements the cleanup phase:
592 - Removes container from database
593 - Leaves container running for debugging
594
595 Args:
596 container_id: Container ID to clean up
597 db: Database instance (creates new if None)
598 """
599 if db is None:
600 db = ContainerDatabase()
601
602 # Remove from DB (container stays alive)
603 db.delete_by_id(container_id)
604
605 print(
606 f"Container {container_id} released. Container still running for debugging. "
607 f"Use 'docker stop {container_id}' to stop it."
608 )
609
610
611def cleanup_orphaned_containers(db: Optional[ContainerDatabase] = None) -> int:

Callers

nothing calls this directly

Calls 3

delete_by_idMethod · 0.95
ContainerDatabaseClass · 0.85
printFunction · 0.50

Tested by

no test coverage detected