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.
|broker||Package broker reserves jobs from beanstalkd, spawns worker processes, and manages the interaction between the two.|
|bs||Package bs provides a richer and/or more domain-specific layer over github.com/kr/beanstalk, including active-record style Job type.|
|cli||Package cli provides command line support for cmdstalk.|
|cmd||Package cmd provides a more domain-specific layer over exec.Cmd.|