Documentation
¶
Overview ¶
Command fullcore is the full-core embed story in one file: it wires the queue, an executor registry, and a worker pool together as a library — no tq binary involved — and proves the backend-choice import: pick --backend sqlite (default, single file) or --backend postgres (shared queue across machines). Both stores satisfy queue.Store, so the rest of the program is backend-agnostic.
Usage:
go run ./examples/fullcore go run ./examples/fullcore --backend postgres --dsn postgres://127.0.0.1:5432/taskqueue?sslmode=disable
The demo enqueues a few shell tasks plus a custom in-process executor task, runs the pool until the queue drains, and prints the final status counts. Keep --backend postgres pointed at a local/test database; the example applies the store schema to it.
The example runs NO budget gate: worker.Config.Budget is where an embedder caps paid agent turns per day (see internal/worker's ExampleConfig_budget).