TaskRepository
interface TaskRepository
Repository abstraction for persisting task state across app restarts.
The primary use case is task recovery: On app restart, call getPending to find tasks that were interrupted and re-enqueue them via KmpWorker.enqueue.
Inheritors
Functions
Link copied to clipboard
Returns all persisted tasks.
Link copied to clipboard
Returns a single task by ID, or null if not found.
Link copied to clipboard
Returns tasks with status PENDING or RUNNING. Use this on app restart to recover and re-enqueue interrupted tasks.
Link copied to clipboard
Persists a new TaskRequest with status PENDING. No-ops if a task with the same ID already exists.
Link copied to clipboard
Updates the status and retry count for a task.