611fc81b6b
- 0050: jupyter_exec reescrito sin Y.js (REST + KernelClient). Bug raíz adicional: HEAD /api/contents da 405 → cambiado a GET. 9 tests (5 unit + 4 e2e). - 0052: footprint_aurgi cerrado. Bug fix en setup_geo_stack_docker_pipeline (verify aborta si compose up falla; nombre de contenedor incorrecto). - Nueva primitiva docker_container_running_py_infra (7 tests). - /full-git-push y /full-git-pull pasan a modo automático: auto-commit + push sin preguntar, aborta solo si detecta secrets. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.0 KiB
2.0 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| docker_container_running | function | py | infra | 1.0.0 | impure | docker_container_running(name: str, timeout: float = 5.0) -> bool | Comprueba si un contenedor Docker existe y está corriendo. True solo si docker inspect retorna State.Running=true. Cualquier fallo (docker ausente, contenedor inexistente, daemon caído, timeout) devuelve False sin excepción. |
|
false | error_go_core |
|
|
True si el contenedor existe y está corriendo. False en cualquier otro caso (no existe, está parado, docker no disponible, timeout). | true |
|
python/functions/infra/tests/test_docker_container_running.py | python/functions/infra/docker_container_running.py |
Ejemplo
from python.functions.infra.docker_container_running import docker_container_running
if docker_container_running("better_maps_valhalla"):
print("Valhalla up")
else:
print("Valhalla down")
Notas
Wrapper minimalista sobre docker inspect -f '{{.State.Running}}'. Pensado como
primitiva componible para verificadores de stack y health checks. No lanza
excepciones — un fallo de cualquier tipo se reporta como False, dejando que
el caller decida qué hacer (skip de test, reintentar, levantar el stack, etc.).