Documentation
¶
Overview ¶
Command modules is the program of the recipe "Organize tasks by module", docs/recipes/organize-tasks-by-module.md: one binary of two modules, orders and billing, which share one taskmill schema. Each module owns its task types, its queue, its handlers, and its schedules, and main puts them together.
docker run --name taskmill-pg -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres:18 go run ./examples/modules
It reads the database from DATABASE_URL, by default the one that the docker command above starts. It places one order, logs the receipt and the invoice, and runs until Ctrl-C.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
billing
Package billing is the billing module of the example: it creates invoices.
|
Package billing is the billing module of the example: it creates invoices. |
|
billing/billingtasks
Package billingtasks holds the tasks of the billing module: the types that other modules enqueue, and nothing else.
|
Package billingtasks holds the tasks of the billing module: the types that other modules enqueue, and nothing else. |
|
orders
Package orders is the orders module of the example: it takes orders.
|
Package orders is the orders module of the example: it takes orders. |
|
orders/ordertasks
Package ordertasks holds the tasks of the orders module: the types that other modules enqueue, and nothing else.
|
Package ordertasks holds the tasks of the orders module: the types that other modules enqueue, and nothing else. |