Checkpoint and Resume: Crash Without Sending Twice
My job crashed, I restarted it, and it sent the same email twice.
Video #38 ยท AI agents and MCP
Steps in the video
Files
- compare.py (24 lines)
- runner.py (22 lines)
- tasks.py (37 lines)
Tested with
Python 3.12.15
What this does not show
The crash is a raised error, not a killed process. One crash point per case and six made-up steps. The email is a line in a file. The key check reads a file, so it does not protect two workers running at once. No database, locks or retries.
Sources
Learning IT by Example.