API
Julia entry points when you embed DistSSHQueue. Day-to-day work stays on the CLI (julia --project=. -m DistSSHQueue …); see Home. The longer guide is the DistSSHKit manual. REPL help also works (?DistSSHQueue.submit!).
Submitters using DistSSHQueue. Queue-host code using DistSSHKit. Job files for go / ride still do not call DistSSHKit.
Prefer the CLI. From a client: qhost:HOST on the command line (not --hosts). DISTSSHQUEUE_HOST alone does not hop. CLI submit uses follow_config; library submit! uses Queue(; allowed=…) unless follow_config=true. Config: ~/.distsshqueue/config.toml.
using DistSSHQueue
q = Queue(; store=default_store_path(), follow_config=true)
id = submit!(q, "SCRIPT.jl", "child:host1:4"; kind=:go)
cancel!(q, id)
serve!(q)Types
DistSSHQueue.DistSSHQueue — Module
DistSSHQueue — FIFO serve for DistSSHKit (go / ride / drive).
Package entry: exports, includes, main (@main on Julia 1.13+). FIFO core: src/job.jl, src/store.jl, src/paths.jl, src/config.jl, src/queue.jl. Client CLI: src/client/. Queue host CLI: src/qhost/. Messages: src/messages/. serve runs DistSSHRun execute!(...; detached=true) for kinds in KIT_EXECUTE_KINDS. --project=<queue-env> loads this package; the Kit project is job_project(). Autoserve uses the Julia and --project= from the enable unit when that file exists. Config: ~/.distsshqueue/config.toml.
Concept: docs.
DistSSHQueue.Queue — Type
FIFO table: one DistSSHKit job at a time. Placement tokens are Kit's, not a Queue ceiling.
DistSSHQueue.Job — Type
One table row. hosts are remote machine tokens (N*host / bare host); head uses kwargs. kwargs is an opaque bag for DistSSHRun execute! (project is the Kit project). cancel true means a running job was asked to stop and is still in setup.
Job persists the artifact-related fields used by cancel and fetch. Their ownership and fallback order are described in Artifacts and paths.
Enqueue and cancel
DistSSHQueue.submit! — Function
Enqueue. kind is a DistSSHRun execute! kind in KIT_EXECUTE_KINDS (:go, :ride, :drive).
hosts are remote machine tokens (N*host or bare host). Head uses kwargs head_workers / head_slots. Missing project uses job_project() (cwd / DISTRIBUTED_PROJECT_ROOT), not the serve env (enable --queue-env / Julia --project= that loaded Queue). Same verb as CLI submit.
q.allowed is the inventory (Queue(; allowed=…)), names plus optional max :N. It does not read config.toml. CLI submit uses Queue(; follow_config=true) so each enqueue re-reads hosts without restarting serve. step! does not drop :queued rows when a name is later removed, and does not stop a Kit job that is already :running.
DistSSHQueue.cancel! — Function
Cancel :queued now. A :running job with no live kit.pid stays :running and records a cancel flag, so the slot stays taken until setup stops. A live kit.pid under the run dir or output_dir is terminate_run! and :cancelled. That stop sends SIGINT once, waits 30 seconds or DISTSSH_WAIT_SIGINT_GRACE in this process (0 sends no SIGINT), then SIGTERM. The tagged-worker reap has its own bound and still returns when a host is unreachable.
A setup step (rsync, instantiate, check) runs to the end. The flag is read again before the next step and before execute!.
cancel! of a running job sends SIGINT, then SIGTERM. The wait is 30 seconds, or DISTSSH_WAIT_SIGINT_GRACE in the calling process. Unreachable hosts do not hold the reap open.
Table
DistSSHQueue.jobs — Function
Copy of the table.
DistSSHQueue.job — Function
Copy of one row. id may be a unique prefix of the stored UUID.
DistSSHQueue.load! — Function
Load store (stale :running → :failed).
DistSSHQueue.step! — Function
Start the FIFO head if nothing is :running. At most one Kit job.
serve
DistSSHQueue.serve! — Function
Load store (stale :running → :failed, or :cancelled when a cancel flag is set), then step! until interrupt.
Ctrl-C during setup fails that job. Ctrl-C after execute! has detached stops this process and leaves the Kit job running.
A second serve on the same store prints Already running and returns.
DistSSHQueue.serve — Function
serve(; store=default_store_path(), interval=0.2) -> NothingRun serve! on store. Ctrl-C during setup fails that job. After execute! has detached, Ctrl-C stops this process and leaves the Kit job running. The CLI rejects a non-finite --interval. interval == 0 still runs and warns once; a negative finite value warns once, then sleep fails.
Paths
DistSSHQueue.job_project — Function
Kit project: DISTRIBUTED_PROJECT_ROOT, else the Project.toml above cwd, else cwd.
Not the Julia --project= that loaded DistSSHQueue.
DistSSHQueue.default_store_path — Function
Jobs file for a queue host: ~/.distsshqueue/jobs.toml under home.
The store and its lock files are on a local disk: APFS, ext4, or the WSL2 Linux filesystem. NFS, and a WSL drvfs mount such as /mnt/c, are not a store location. The cross-process lock is flock on the sibling file jobs.toml.flock.