Method: Cod::Beanstalk::Channel#put
- Defined in:
- lib/cod/beanstalk/channel.rb
#put(msg) ⇒ void
This method returns an undefined value.
Puts a job on the tube after serializing.
47 48 49 50 51 52 53 54 55 |
# File 'lib/cod/beanstalk/channel.rb', line 47 def put(msg) pri = JOB_PRIORITY delay = 0 ttr = 120 body = @body_serializer.en(msg) answer, *rest = @transport.interact([:put, pri, delay, ttr, body]) fail "#put fails, #{answer.inspect}" unless answer == :inserted end |