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

Function update_breadcrumb_status

ci/util/download_breadcrumb.py:145–167  ·  view source on GitHub ↗

Update the status and other fields in an existing breadcrumb. Args: breadcrumb_path: Path to the breadcrumb file status: New status value **updates: Additional fields to update Returns: True if update succeeded, False otherwise

(
    breadcrumb_path: Path, status: str, **updates: Any
)

Source from the content-addressed store, hash-verified

143
144
145def update_breadcrumb_status(
146 breadcrumb_path: Path, status: str, **updates: Any
147) -> bool:
148 """
149 Update the status and other fields in an existing breadcrumb.
150
151 Args:
152 breadcrumb_path: Path to the breadcrumb file
153 status: New status value
154 **updates: Additional fields to update
155
156 Returns:
157 True if update succeeded, False otherwise
158 """
159 data = read_breadcrumb(breadcrumb_path)
160 if data is None:
161 data = {}
162
163 data["status"] = status
164 data["updated_at"] = datetime.now().isoformat()
165 data.update(updates)
166
167 return write_breadcrumb(breadcrumb_path, data)
168
169
170def get_cache_artifact_dir(cache_dir: Path, url: str) -> Path:

Callers

nothing calls this directly

Calls 4

read_breadcrumbFunction · 0.85
write_breadcrumbFunction · 0.85
nowMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected