cmdstalk: github.com/99designs/cmdstalk Files | Directories

Command cmdstalk

Cmdstalk is a unix-process-based [beanstalkd][beanstalkd] queue broker.

Written in [Go][golang], cmdstalk uses the [kr/beanstalk][beanstalk] library to interact with the [beanstalkd][beanstalkd] queue daemon.

Each job is passed as stdin to a new instance of the configured worker command. On `exit(0)` the job is deleted. On `exit(1)` (or any non-zero status) the job is released with an exponential-backoff delay (releases^4), up to 10 times.

If the worker has not finished by the time the job TTR is reached, the worker is killed (SIGTERM, SIGKILL) and the job is allowed to time out. When the job is subsequently reserved, the `timeouts: 1` will cause it to be buried.

In this way, job workers can be arbitrary commands, and queue semantics are reduced down to basic unix concepts of exit status and signals.

Package Files

cmdstalk.go

Directories

PathSynopsis
brokerPackage broker reserves jobs from beanstalkd, spawns worker processes, and manages the interaction between the two.
bsPackage bs provides a richer and/or more domain-specific layer over github.com/kr/beanstalk, including active-record style Job type.
cliPackage cli provides command line support for cmdstalk.
cmdPackage cmd provides a more domain-specific layer over exec.Cmd.

Package main imports 2 packages (graph). Updated 2016-07-27. Refresh now. Tools for package owners.