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
)
| 143 | |
| 144 | |
| 145 | def 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 | |
| 170 | def get_cache_artifact_dir(cache_dir: Path, url: str) -> Path: |
nothing calls this directly
no test coverage detected