Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Example dante daemon with beanstalkd
#!/usr/bin/env ruby
require 'bundler/setup'
require 'dante'
require 'beaneater''mailer') do |opts|
# Connect to beanstalkd on default ports
beanstalk = ['localhost:11300'] do |job|
# This is useful for integration testing or if you wish to gracefully stop processing before killing the daemon
raise Beaneater::AbortProcessingError if job.body == "no_more_beans"
# process the job for example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.