Load a prior run's journal from disk, or None if absent/unreadable.
(path: str)
| 34 | |
| 35 | |
| 36 | def load_journal(path: str) -> Optional[dict]: |
| 37 | """Load a prior run's journal from disk, or None if absent/unreadable.""" |
| 38 | try: |
| 39 | return Journal.load(Path(path).read_text(encoding="utf-8")) |
| 40 | except (OSError, ValueError) as exc: |
| 41 | logger.debug("could not load workflow journal from %s: %s", path, exc) |
| 42 | return None |
| 43 | |
| 44 | |
| 45 | async def run_workflow_task( |