SDKs & ToolsCLI

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

OptionRequiredDefaultDescription
--manifest <IMAGE>noPrint the Worker release manifest for this immutable image reference, then exit
--json-logsnoWrite structured JSON logs to standard error

Subcommands

CommandSummary
spiral worker runExecute one Task on this machine, then exit
spiral worker startRegister 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

ArgumentRequiredDefaultDescription
DEFINITIONnoA TaskDefinition JSON file, or - to read it from standard input

Options

OptionRequiredDefaultDescription
--task <TASK_ID>noExecute this already-submitted Task, in its own Project, instead of submitting a definition
--project <PROJECT>noProject to submit the definition in. The CLI prompts when this option is omitted
--json-logsnoWrite 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

OptionRequiredDefaultDescription
--project <PROJECT>noProject that owns the Tasks. The CLI prompts when this option is omitted
--pool <POOL>noWorkerPool name within the project, or an exact UUIDv7
--json-logsnoWrite structured JSON logs to standard error
Found a problem? Edit this page or report an issue.

On this page