Skip to content

Commit bfe622f

Browse files
committed
Add check that environment is currently build (running or paused)
1 parent 51d91d1 commit bfe622f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/manage_hf_collection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def discover_openenv_spaces(api: HfApi) -> List[str]:
132132
space_info = api.space_info(space.id)
133133
# Check if it's a Docker space and has the openenv tag
134134
if (hasattr(space_info, 'sdk') and space_info.sdk == 'docker' and
135-
hasattr(space_info, 'tags') and TAG_FILTER in space_info.tags):
135+
hasattr(space_info, 'tags') and TAG_FILTER in space_info.tags and
136+
space_info.runtime.stage != "RUNTIME_ERROR"):
136137
docker_spaces_with_tag.append(space.id)
137138
except Exception as e:
138139
logger.warning(f"Could not fetch info for space {space.id}: {e}")

0 commit comments

Comments
 (0)