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

Function create_download_breadcrumb

ci/util/download_breadcrumb.py:115–142  ·  view source on GitHub ↗

Create a breadcrumb for a completed download with metadata. Args: cache_dir: Base cache directory url: URL that was downloaded status: Download status (default: "complete") **metadata: Additional metadata to include in breadcrumb Returns: True i

(
    cache_dir: Path,
    url: str,
    status: str = "complete",
    **metadata: Any,
)

Source from the content-addressed store, hash-verified

113
114
115def create_download_breadcrumb(
116 cache_dir: Path,
117 url: str,
118 status: str = "complete",
119 **metadata: Any,
120) -> bool:
121 """
122 Create a breadcrumb for a completed download with metadata.
123
124 Args:
125 cache_dir: Base cache directory
126 url: URL that was downloaded
127 status: Download status (default: "complete")
128 **metadata: Additional metadata to include in breadcrumb
129
130 Returns:
131 True if breadcrumb was created successfully
132 """
133 breadcrumb_path = get_breadcrumb_path(cache_dir, url)
134
135 data = {
136 "status": status,
137 "url": url,
138 "timestamp": datetime.now().isoformat(),
139 **metadata,
140 }
141
142 return write_breadcrumb(breadcrumb_path, data)
143
144
145def update_breadcrumb_status(

Callers 1

download_toolchainFunction · 0.90

Calls 3

get_breadcrumb_pathFunction · 0.85
write_breadcrumbFunction · 0.85
nowMethod · 0.45

Tested by

no test coverage detected