Climb the beanstalk! Ruby library to interact gracefully with beanstalkd & PM2.
- beanstalkd jobs may be accessed via
get_msg
andsend_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
}
- 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>")