Skip to content

Worker and scheduler commands

queue:work, schedule:work and mcp:start are distinct consumer/service processes. Other commands inspect or change their records. Run each from the project root using orionis or the local reactor file.

Every signature supports -h / --help. Retry/persistence policies belong to Queues or the scheduler; do not infer flags from other worker systems.

List HTTP and local MCP servers.

Takes no arguments or command-specific options; automatic help remains available.

Read IMcpManager.servers() and display transport, endpoint/handle and server class. An empty registry produces an informational message. It neither starts servers nor takes filters.

Terminal window
orionis mcp:list
python -B reactor mcp:list

Start a local MCP server over STDIO.

Argument or optionType and presenceEffective value when omittedPurpose
namestr, required—File/class name; generators support nested directories.

name is a required local MCP handle, not a URL or class. Check it exists and execute IMcpManager.startLocal(name). A missing/invalid handle returns 1; normal completion returns 0. STDIN/STDOUT carry the protocol while startup/command/shutdown diagnostics are redirected to STDERR. This does not start HTTP and has no --host, --port or --transport. See the MCP guide for handle registration and the implemented protocol revision.

Terminal window
orionis mcp:start catalog
python -B reactor mcp:start catalog

Clear a queue, including delayed or reserved jobs.

Argument or optionType and presenceEffective value when omittedPurpose
connectionstr, optionalDefault connectionQueue connection name.
--queuestr, optionaldefaultQueue name; queue:work accepts comma-separated names.

connection is optional (None: default). --queue is a string with the literal default default, even if the connection configures another queue name; it does not take a comma-separated list. Remove ready, delayed and reserved jobs and display the count. There is no confirmation or --force; failure records are retained and side effects of an already running handle() cannot be undone. Return 0, or 1 on QueueError.

Terminal window
orionis queue:clear database --queue reports
python -B reactor queue:clear database --queue reports

List terminally failed jobs.

Takes no arguments or command-specific options; automatic help remains available.

Take no connection, pagination or flags. Read the SQL failure repository configured in queue.failed, including when jobs use Redis or sync. Display failure-record ID, job ID, connection/queue, attempts and exception. Use the first ID with retry/forget. Return 0 on successful querying or 1 on QueueError.

Terminal window
orionis queue:failed
python -B reactor queue:failed

Remove a failure record.

Argument or optionType and presenceEffective value when omittedPurpose
idstr, required—Failure-record ID, rather than the job ID.

id is a required positional string identifying a failure record. It neither retries the job nor deletes active queue work. Return 0 on deletion or 1 if absent or a QueueError occurs.

Terminal window
orionis queue:forget 866a127d-3185-4e5c-b21c-65eef9cd78a8
python -B reactor queue:forget 866a127d-3185-4e5c-b21c-65eef9cd78a8

Creates missing tables for every queue connection using the database driver and the central SQL failure repository.

Takes no arguments or command-specific options; only automatic help.

Available since 1.0.10. Uses the application’s queue configuration and respects configured SQL connections, table names, and prefixes. Includes non-default Database queue connections and prepares failure storage even when jobs use sync or redis. Creates columns and indexes while preserving existing data; it does not compare or update incompatible older structures. It neither opens Redis clients nor starts workers. Lazy creation on first use remains available.

The SQL user needs creation permissions, and the backend must enforce unique constraints. It accepts neither --database, a positional connection, nor --force. Success prints Queue tables migrated successfully. and returns 0; a caught DatabaseException or QueueError returns 1. See table preparation and Queue.migrate().

Terminal window
orionis queue:migrate
python reactor queue:migrate

Requeue one identified failed job.

Argument or optionType and presenceEffective value when omittedPurpose
idstr, required—Failure-record ID, rather than the job ID.

id is the required failure-record identifier displayed by queue:failed. Push the original envelope to its original connection/queue, preserve the job ID, then remove the failure record. An expired retryUntil() or absent failure returns 1 through QueueError. There is no all, --all or connection selector. Push and failure deletion are separate steps; see Queues for atomicity limits.

Terminal window
orionis queue:retry 866a127d-3185-4e5c-b21c-65eef9cd78a8
python -B reactor queue:retry 866a127d-3185-4e5c-b21c-65eef9cd78a8

Consume persisted jobs from a queue connection.

Argument or optionType and presenceEffective value when omittedPurpose
connectionstr, optionalDefault connectionQueue connection name.
--queuestr, optionalConnection queueQueue name; queue:work accepts comma-separated names.
--concurrencyint, optionalqueue.worker.concurrencyConcurrent consumers; positive integer.
--max-jobsint, optionalUnlimitedMaximum reserved attempts; positive integer.
--stop-when-emptyFlag, optionalFalseStop when polling finds no ready work.

connection is an optional positional string (None: default connection). --queue takes comma-separated names, trimming surrounding whitespace and preserving priority order. Omission uses the connection’s configured queue. --concurrency is an optional positive integer (default queue.worker.concurrency); --max-jobs limits reserved attempts using a positive integer, with no limit when omitted. Enable --stop-when-empty (default False) to stop when no work is ready at polling time: delayed or reserved jobs may remain.

The sync connection cannot create workers. Signal handlers request graceful shutdown. Successful completion prints the attempt count and returns 0; QueueError returns 1. This command has no --tries, --timeout, --backoff, --sleep or --retry-after options: these come from configuration and job policy.

Terminal window
orionis queue:work database --queue critical,default --concurrency 2 --max-jobs 100 --stop-when-empty
python -B reactor queue:work database --queue critical,default --concurrency 2 --max-jobs 100 --stop-when-empty

Inspect tasks defined by the scheduler.

Takes no arguments or command-specific options; automatic help remains available.

Resolve app.getScheduler() and ISchedule, then invoke tasks(schedule=...) through the container before reading info(). Display signature, arguments, purpose, random delay, coalescing, maximum instances, misfire grace and dates. It does not call the service’s boot() or process tasks. The application’s tasks() method is evaluated, so keep it focused on schedule declarations.

Terminal window
orionis schedule:list
python -B reactor schedule:list

Start the scheduler process.

Takes no arguments or command-specific options; automatic help remains available.

Load the registered scheduler, require a callable tasks(), register tasks and onStarted, onPaused, onResumed / onShutdown listeners, run ISchedule.boot() and await wait(). This is a persistent process rather than one tick or a command to launch every minute. There are no --once, --queue or driver flags: task configuration selects persistence.

After startup, KeyboardInterrupt or cancellation triggers shutdown() followed by a wait for closure. Recognized connection, persistence and filesystem errors are displayed with status 1; other exceptions propagate. The scheduler guide covers scheduled-job exceptions and listeners.

Terminal window
orionis schedule:work
python -B reactor schedule:work

See Queue workers, Retries and failures, Task scheduling and MCP to configure services and components.