GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Fork of dustin/beanstalk-client-ruby
Description: Ruby client for beanstalkd
Homepage: http://xph.us/software/beanstalkd/
Clone URL: git://github.com/kr/beanstalk-client-ruby.git
Each job should have its connection, not the pool.
kr (author)
Thu May 29 19:53:41 -0700 2008
commit  9faa74d475edb46e9bf202d2f186e8f719f205a8
tree    572dfdf4d9125b2e16ef79f6298210af3872db8e
parent  10a860ab87d27049e987d98a5065ae7b0515ee2f
...
26
27
28
29
 
30
31
32
33
34
35
...
89
90
91
92
 
93
94
95
...
181
182
183
184
 
185
186
187
...
225
226
227
228
 
229
230
231
...
26
27
28
 
29
30
31
 
32
33
34
...
88
89
90
 
91
92
93
94
...
180
181
182
 
183
184
185
186
...
224
225
226
 
227
228
229
230
0
@@ -26,10 +26,9 @@ module Beanstalk
0
   class Connection
0
     attr_reader :addr
0
 
0
- def initialize(addr, jptr=self, default_tube=nil)
0
+ def initialize(addr, default_tube=nil)
0
       @waiting = false
0
       @addr = addr
0
- @jptr = jptr
0
       connect
0
       @last_used = 'default'
0
       @watch_list = [@last_used]
0
@@ -89,7 +88,7 @@ module Beanstalk
0
         @waiting = false
0
       end
0
 
0
- Job.new(@jptr, *read_job('RESERVED'))
0
+ Job.new(self, *read_job('RESERVED'))
0
     end
0
 
0
     def delete(id)
0
@@ -181,7 +180,7 @@ module Beanstalk
0
     end
0
 
0
     def found_job()
0
- Job.new(@jptr, *read_job('FOUND'))
0
+ Job.new(self, *read_job('FOUND'))
0
     rescue NotFoundError
0
       nil
0
     end
0
@@ -225,7 +224,7 @@ module Beanstalk
0
         begin
0
           if !@connections.include?(addr)
0
             puts "connecting to beanstalk at #{addr}"
0
- @connections[addr] = Connection.new(addr, self, @default_tube)
0
+ @connections[addr] = Connection.new(addr, @default_tube)
0
             prev_watched = @connections[addr].list_tubes_watched()
0
             to_ignore = prev_watched - @watch_list
0
             @watch_list.each{|tube| @connections[addr].watch(tube)}

Comments

    No one has commented yet.