Run GC in a separate thread with timeout protection.
()
| 221 | import concurrent.futures |
| 222 | |
| 223 | def _gc_task() -> tuple[int, int]: |
| 224 | """Run GC in a separate thread with timeout protection.""" |
| 225 | db = ContainerDatabase() |
| 226 | orphans = cleanup_orphaned_containers(db) |
| 227 | old = garbage_collect_platform_containers( |
| 228 | "unit-tests", max_containers=MAX_CONTAINERS_PER_PROJECT, db=db |
| 229 | ) |
| 230 | return orphans, old |
| 231 | |
| 232 | try: |
| 233 | # Run GC with a 30-second timeout to prevent hanging on Docker API errors |
nothing calls this directly
no test coverage detected