Skip to content

feat: Add PostgreSQL checkpoint storage with pause/resume support#336

Open
Kkt04 wants to merge 3 commits intoGetBindu:mainfrom
Kkt04:featadd-postgreSQL-checkpoint-storage
Open

feat: Add PostgreSQL checkpoint storage with pause/resume support#336
Kkt04 wants to merge 3 commits intoGetBindu:mainfrom
Kkt04:featadd-postgreSQL-checkpoint-storage

Conversation

@Kkt04
Copy link

@Kkt04 Kkt04 commented Mar 6, 2026

Feature Fix Summary

  • PostgreSQL Checkpoint Storage: Implemented checkpoint persistence with methods: save_checkpoint, get_checkpoint, delete_checkpoint, list_checkpoints, and cleanup_old_checkpoints.
  • Database Migration: Added migration 20260306_0001_add_task_checkpoints.py to create the checkpoint table with proper indexes.
  • Pause/Resume Architecture: Centralized pause/resume logic in the Worker base class to remove duplicated implementations.
  • Task State Fix: Updated state management:
    • Removed suspended from terminal_states
    • Added it to non_terminal_states
    • Introduced pausable_states
  • Worker Pause/Resume Handling: Implemented _handle_pause and _handle_resume methods that save and restore checkpoints.
  • URL Validation: Confirmed existing validation in notifications.py using urlparse with scheme and netloc checks.
  • Integration Tests: Added 43 tests covering pause/resume behavior, checkpoint persistence, and state transitions.
  • Documentation: Created docs/CHECKPOINTS.md and docs/STATE_TRANSITIONS.md.
  • Checkpoint Cleanup: Added automatic cleanup in manifest_worker.py when tasks reach completed, failed, or canceled states.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant