public
Created

Beaneater test

  • Download Gist
beans.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14
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"

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.