stalker 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/stalker.rb +6 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
data/lib/stalker.rb
CHANGED
@@ -6,6 +6,11 @@ require 'timeout'
|
|
6
6
|
module Stalker
|
7
7
|
extend self
|
8
8
|
|
9
|
+
def connect(url)
|
10
|
+
@@url = url
|
11
|
+
beanstalk
|
12
|
+
end
|
13
|
+
|
9
14
|
def enqueue(job, args={}, opts={})
|
10
15
|
pri = opts[:pri] || 65536
|
11
16
|
delay = opts[:delay] || 0
|
@@ -123,6 +128,7 @@ module Stalker
|
|
123
128
|
end
|
124
129
|
|
125
130
|
def beanstalk_url
|
131
|
+
return @@url if defined?(@@url) and @@url
|
126
132
|
ENV['BEANSTALK_URL'] || 'beanstalk://localhost/'
|
127
133
|
end
|
128
134
|
|