Barbequeue is a simple framework for running shell scripts that read from a queue, perform centralized logging, collect detailed statistics, and provide notifications on errors.

Its genesis is feeling the pain of running small shell scripts over and over again. Running them one-off on the command line first, then trying cron to periodically kick off tasks based on results from find, then finally realizing that a work queue is the proper solution to the problem–without sacrificing the ability to run one-offs.

Queues


Workers


Workers can be run in two modes: daemon and one-off mode. Starting a worker with no arguments will run in daemon mode, reading from the queue specified in the worker class. Passing an argument to the worker will process that argument (as if it was read from the queue) and terminate.

There are several examples in the examples/workers directory.

Mixins


For lack of a better name, Mixins are actually Ruby mixins that allow you to add functionality to any of your workers. Some ideas would be things like logging, statistics, and exception notification.