Project

sabbath

0.0
No commit activity in last 3 years
No release in over 3 years
Rest for your work (queues)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.0.6
>= 0
>= 0
>= 0
>= 0
>= 0
 Project Readme

Sabbath¶ ↑

REST interface to beanstalkd (or probably other queues at some point).

Usage¶ ↑

>> sabbath -h

Usage: sabbath [options]

Options:
    -p, --port[OPTIONAL]             Port (default: 11300)
    -h, --host[OPTIONAL]             Host (default: localhost)
    -P, --web-port[OPTIONAL]         Web port (default: 4848)
    -H, --web-host[OPTIONAL]         Web host (default: 0.0.0.0)
    -R, --rackup[OPTIONAL]           Rackup file (optional)
        --help                       Show this help message.

Why?¶ ↑

This allows you to interface with beanstalk over normal HTTP calls. I’ve included a really simple example in the examples directory. It consumes and pushes jobs onto a queue from jQuery.

This provides the following routes:

  • /:tube GET – This lets you get the latest job. If no job is available, the connection will be held open until one becomes available.

  • /:tube/:id GET – This lets you get a job by id.

  • /:tube/:id/release PUT – This lets you release a job back onto beanstalk.

  • /:tube/:id DELETE – This deletes a job from the queue.

  • /:tube POST – This lets you create a new job. The post parameter body is expected.