Docs / Reference
Command line
All commands take the global flags below. mapleloom help COMMAND shows the same information in the terminal.
Global flags
| Flag | Description |
|---|---|
--config FILE | Configuration file. Default: /etc/mapleloom/mapleloom.toml. |
--log-level LEVEL | debug, info, warn or error. |
-h, --help | Show help for a command. |
-v, --version | Print the version and exit. |
mapleloom migrate
Create or update the tables Mapleloom needs. Safe to run on every deploy: migrations that already ran are skipped, and each one runs in a transaction.
mapleloom migrate [flags]
| Flag | Default | Description |
|---|---|---|
--schema NAME | mapleloom | Schema to create the tables in. |
mapleloom worker
Start a worker. A worker takes jobs from its queues and runs them, at most concurrency at a time. It finishes the jobs it is running before it exits on SIGTERM.
mapleloom worker [flags]
| Flag | Default | Description |
|---|---|---|
--queues LIST | default | Comma-separated queues to take jobs from. |
--concurrency N | 10 | Jobs run at the same time. |
mapleloom enqueue
Add a job from the command line. ARGS is a JSON object. The job ID is printed on success.
mapleloom enqueue [flags] KIND [ARGS]
| Flag | Default | Description |
|---|---|---|
--queue NAME | default | Queue to add the job to. |
--at TIME | – | Run the job no earlier than this time. |
--priority N | 0 | Higher runs first. |
mapleloom jobs
List jobs.
mapleloom jobs [flags]
| Flag | Default | Description |
|---|---|---|
--state STATE | – | available, running, retrying, failed or done. |
--queue NAME | – | Only jobs in this queue. |
--limit N | 50 | At most N jobs. |
mapleloom retry
Run failed jobs again. The attempt counter starts over.
mapleloom retry [flags] ID...
| Flag | Default | Description |
|---|---|---|
--all-failed | false | Retry every failed job. |
mapleloom completion
Print a shell completion script. SHELL is bash, zsh or fish.
mapleloom completion SHELL