Data Operations
Canceling Tasks
Learn how to cancel queued tasks in Chunkr AI
Chunkr AI allows you to cancel tasks that are in queede but haven’t started processing. Any task that has status Starting
can be canceled.
You can cancel tasks either by their ID or using a task object.
Canceling by Task ID
Use the cancel_task()
method when you have the task ID:
Canceling from TaskResponse Object
If you have a task object, you can cancel it directly using the cancel()
method. This method will also return the updated task status:
Async Usage
For async applications, use await
: