Skip to main content

Quick Start

Run a persistent TaskDaemon instance and verify a Python handler from submission to completion.

Prerequisites

Docker must be installed and running. Check docker info; if it fails, start the Docker engine yourself before continuing. The polling example also uses curl and jq.

1. Create a Handler

Create handler.py:
Create Dockerfile.handler:

2. Build the Handler Image

3. Create Handler Config

Create handlers.toml:

4. Start TaskDaemon

Use a validated image release, or build the current source. Inspect startup with docker logs taskdaemon. The CLI defaults to 2 workers. /health confirms queue access; the first submitted task also checks that the handler can initialize and respond.

5. Submit and Wait for a Result

This Bash script waits up to 60 seconds for daemon health and 120 seconds for task completion:
A completed response includes result: {"message":"Hello, TaskDaemon!"}. Check status before interpreting a result; submission only acknowledges that the task was persisted.

6. Cleanup

The task-data volume remains so a replacement daemon can read the task history. Delete it only when you intentionally want to discard that data:

Next Steps