/Spriggan

Climb the beanstalk! 🌱

Primary LanguageRubyGNU General Public License v3.0GPL-3.0

xUnit Tests Formatting Check

Spriggan

Climb the beanstalk! Ruby library to interact gracefully with beanstalkd & PM2.

Usage

beanstalkd

  • beanstalkd jobs may be accessed via get_msg and send_msg
  • Sending messages must take the format of send_msg(<ruby_object>, "<beanstalkd_tube>")
  • Received messages from hash = get_msg will take the following form:
hash = {
  "to" => "<beanstalkd_dest_tube>"
  "from" => "<beanstalkd_src_tube>"
  "msg" => Ruby.object
}

PM2

  • Any threads started with Spriggan.run have a trap to detect PM2 SIGINTs and exit gracefully
  • Logging messages to PM2 is done with Spriggan.pm2_log("<message>")