Skip to content

[Bug]: Unimplemented Task Pause/Resume Functionality in Base Worker #522

@Aditya8369

Description

@Aditya8369

Description:

The base worker class in bindu/server/workers/base.py has TODO comments and raises NotImplementedError for pause and resume operations. These critical task lifecycle features are called from the handler but lack implementation, preventing users from pausing long-running tasks or resuming suspended ones. This impacts usability in production scenarios with interruptible workflows.

Steps to Fix:

Read bindu/server/workers/base.py to understand the existing task state management and storage interface.
Implement _handle_pause(): Serialize current task execution state (e.g., agent context, partial results) to storage, update task state to "suspended", release resources.
Implement _handle_resume(): Restore state from storage, update state to "resumed", continue execution from checkpoint using the scheduler.
Add unit tests in tests/unit/test_workers.py (create if missing) covering pause/resume cycles with mock storage.
Update README.md or docs/SCHEDULER.md to document the new functionality.
Test end-to-end with pytest tests/unit/ and verify in integration tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions