Method: Cod.beanstalk

Defined in:
lib/cod.rb

.beanstalk(tube_name, server = 'localhost:11300') ⇒ Cod::Beanstalk::Channel

Creates a channel based on the beanstalkd messaging queue.

Parameters:

  • tube_name (String)

    name of the tube to send messages to / receive messages from

  • server (String) (defaults to: 'localhost:11300')

    address of the server to connect to

Returns:



115
116
117
# File 'lib/cod.rb', line 115

def beanstalk(tube_name, server=nil)
  Cod::Beanstalk::Channel.new(tube_name, server||'localhost:11300')
end