Skip to content

Instantly share code, notes, and snippets.

@bangline
Created July 9, 2013 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bangline/5962377 to your computer and use it in GitHub Desktop.
Save bangline/5962377 to your computer and use it in GitHub Desktop.
Beaneater test
beanstalk = Beaneater::Pool.new(['localhost:11300'])
#=> <Beaneater::Pool:0x007fe25c1d2f40 @connections=[#<Beaneater::Connection host="localhost" port=11300>]>
t = beanstalk.tubes['tester']
#=> <Beaneater::Tube name="tester">
t.put "5"
#=> {:status=>"INSERTED", :body=>nil, :id=>"1", :connection=>#<Beaneater::Connection host="localhost" port=11300>}
j = t.peek :ready
#=> <Beaneater::Job id=1 body="5">
j.body
#=> "5"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment