Bindu
Bindu copied to clipboard
[Feature]: Task Pause/Resume
Feature: Task Pause/Resume
What
Add ability to pause and resume running tasks in Bindu.
Why
Long-running AI agent tasks need a way to:
- Temporarily stop execution to free resources
- Resume from where it left off
How
Pause:
- Save task state/metadata/context as checkpoint
- Update task to "suspended" state
Resume:
- Load checkpoint from storage
- Restore context
- Update task to "resumed" state
Rules:
- Can only pause tasks in "working" state
- Can only resume tasks in "suspended" state
- Cannot pause/resume completed, canceled, or failed tasks
Files
bindu/server/workers/base.py- Implement pause/resume handlersbindu/server/scheduler/base.py- Abstract methods (already exist)
looks like we can implement the pause/resume feature by adding a new state machine to the task lifecycle, with abstract methods in bindu/server/scheduler/base.py and concrete implementations in bindu/server/workers/base.py. we can use a checkpointing library like tensorflow's tf.train.Checkpoint to save and load task state. should i open a PR for this?
Do you guys work on the feature if yes what's the status?
Oops, let me use the weekend to raise the PR