spiral worker
Execute durable Spiral Tasks
This command requires the spiral-host execution host. The spiral-cli installation does not include it.
Execute durable Spiral Tasks on this machine. run executes one Task and exits; start registers a Worker that claims Tasks until it drains.
Usage: spiral worker [OPTIONS] [COMMAND]Options
| Option | Required | Default | Description |
|---|---|---|---|
--manifest <IMAGE> | no | Print the Worker release manifest for this immutable image reference, then exit | |
--json-logs | no | Write structured JSON logs to standard error |
Subcommands
| Command | Summary |
|---|---|
spiral worker run | Execute one Task on this machine, then exit |
spiral worker start | Register a Worker and claim Tasks until it drains |
spiral worker run
Execute one Task on this machine, then exit. Given a TaskDefinition, submit it claimed by its submitter, so only a Worker signed in as you claims it and no WorkerPool does, then claim and execute it, retrying within its Attempt limit, and print its TaskResult. With --task, execute a Task you already submitted that way. Only the Task's handler is checked against this machine, not its resource requirements.
Usage: spiral worker run [OPTIONS] <DEFINITION|--task <TASK_ID>>Arguments
| Argument | Required | Default | Description |
|---|---|---|---|
DEFINITION | no | A TaskDefinition JSON file, or - to read it from standard input |
Options
| Option | Required | Default | Description |
|---|---|---|---|
--task <TASK_ID> | no | Execute this already-submitted Task, in its own Project, instead of submitting a definition | |
--project <PROJECT> | no | Project to submit the definition in. The CLI prompts when this option is omitted | |
--json-logs | no | Write structured JSON logs to standard error |
spiral worker start
Register a Worker for one project and claim Tasks until it drains. The Worker runs standalone unless --pool names a WorkerPool. The pool option accepts a name or UUID.
Usage: spiral worker start [OPTIONS]Options
| Option | Required | Default | Description |
|---|---|---|---|
--project <PROJECT> | no | Project that owns the Tasks. The CLI prompts when this option is omitted | |
--pool <POOL> | no | WorkerPool name within the project, or an exact UUIDv7 | |
--json-logs | no | Write structured JSON logs to standard error |