public
Description: An Erlang client library for beanstalkd
Homepage: http://tfletcher.com/dev/erlang-beanstalk
Clone URL: git://github.com/tim/erlang-beanstalk.git
Allow put to be called with just a job body.
tim (author)
Sun May 04 03:02:23 -0700 2008
commit  ce678cf9e0d91b2946ff4b330940daf4d7cf9890
tree    fe79d3779539bee86a5529fcd8f175961972773d
parent  9e7e48927c88dd6d15e048b9dca9a5726901fc37
...
51
52
53
 
 
54
55
56
...
51
52
53
54
55
56
57
58
0
@@ -51,6 +51,8 @@
0
 connect(Host, Port) ->
0
   gen_tcp:connect(Host, Port, [binary, {packet, 0}]).
0
 
0
+put(Body, Socket) when is_list(Body); is_binary(Body) ->
0
+ beanstalk:put(beanstalk_job:new(Body), Socket);
0
 put(Job, Socket) ->
0
   Body = beanstalk_job:body(Job),
0
   send_command({put, priority(Job), delay(Job), ttr(Job), size_of(Body)}, Socket),

Comments

    No one has commented yet.