mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-14 11:06:13 +05:00
run_snapshot calls load_snapshot_payload which replaces self.crawl with a fresh Crawl model instance every time. When N snapshot tasks finish near-simultaneously their independent self.crawl/SM pairs all see 'STARTED + no open snapshots' and race on sm.seal(). The first task drives the SM to a final state (engine.running becomes False), but the loser's current_state still reads STARTED off its stale model field, so python-statemachine then raises 'Can't Seal when in Started.' and fails the whole snapshot task even though the crawl is already sealed. Refresh the row right before the call so the guard sees the committed status, and treat TransitionNotAllowed as the expected idempotent no-op when another task already drove the transition. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| archive_result_service.py | ||
| binary_service.py | ||
| crawl_service.py | ||
| machine_service.py | ||
| process_service.py | ||
| runner.py | ||
| snapshot_service.py | ||
| tag_service.py | ||