peon 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/peon.rb +6 -2
- data/peon.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.3
|
data/lib/peon.rb
CHANGED
|
@@ -96,11 +96,15 @@ module Peon
|
|
|
96
96
|
private
|
|
97
97
|
|
|
98
98
|
def beanstalk
|
|
99
|
-
@@beanstalk ||= Beanstalk::Pool.new([
|
|
99
|
+
@@beanstalk ||= Beanstalk::Pool.new([server.join(":")])
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
def jack
|
|
103
|
-
@@jack ||= EMJack::Connection.new
|
|
103
|
+
@@jack ||= EMJack::Connection.new(:host => server[0], :port => server[1].to_i)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def server
|
|
107
|
+
(ENV["BEANSTALKD_SERVER"] || "127.0.0.1:11300").split(":")
|
|
104
108
|
end
|
|
105
109
|
|
|
106
110
|
def next_job(args, response)
|
data/peon.gemspec
CHANGED