allq 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/allq/actions/base.rb +1 -0
- data/lib/allq/client.rb +23 -14
- data/lib/allq/job.rb +1 -0
- data/lib/allq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fc9bb8ce4c30ef64e02a15976fea3b1fa95c55c
|
4
|
+
data.tar.gz: 572e20aaf3340941cb87480965a9dbf1b1f06edb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6131a91fe939cd4a1c90baecff04df4d03c17459b7ffd742ad5c0b0582dcd02534f07dfbc63750b13a70555b882d8dcaf7fe7ce2398213d82e0bff544e37b18
|
7
|
+
data.tar.gz: cffbdab95f6135fa3a3e407b698f5318abaebad5d1cb6aa16b911245c27561b42e8507b1ee6eeb5b81f035383da524a86abbf58583d6807434a30af692072c2b
|
data/lib/allq/actions/base.rb
CHANGED
data/lib/allq/client.rb
CHANGED
@@ -7,20 +7,8 @@ class AllQ
|
|
7
7
|
URL = ENV['ALLQ_CLIENT_URL'] || '127.0.0.1:7766'
|
8
8
|
def initialize(url = nil)
|
9
9
|
url = URL if url.nil?
|
10
|
-
|
11
|
-
|
12
|
-
@get_action = AllQ::Get.new(@connection, self)
|
13
|
-
@put_action = AllQ::Put.new(@connection, self)
|
14
|
-
@done_action = AllQ::Done.new(@connection, self)
|
15
|
-
@stats_action = AllQ::Stats.new(@connection, self)
|
16
|
-
@release_action = AllQ::Release.new(@connection, self)
|
17
|
-
@touch_action = AllQ::Touch.new(@connection, self)
|
18
|
-
@kick_action = AllQ::Kick.new(@connection, self)
|
19
|
-
@bury_action = AllQ::Bury.new(@connection, self)
|
20
|
-
@clear_action = AllQ::Clear.new(@connection, self)
|
21
|
-
@peek_action = AllQ::Peek.new(@connection, self)
|
22
|
-
@delete_action = AllQ::Delete.new(@connection, self)
|
23
|
-
@parent_job_action = AllQ::ParentJob.new(@connection, self)
|
10
|
+
@connection = nil
|
11
|
+
reload
|
24
12
|
end
|
25
13
|
|
26
14
|
def parent_job(tube, body, ttl: 3600, delay: 0, parent_id: nil, priority: 5, limit: nil, noop: false)
|
@@ -98,6 +86,27 @@ class AllQ
|
|
98
86
|
@release_action.snd(job_id: job.id, delay: delay)
|
99
87
|
end
|
100
88
|
|
89
|
+
def close
|
90
|
+
@connection.close
|
91
|
+
end
|
92
|
+
|
93
|
+
def reload
|
94
|
+
@connection.close if @connection
|
95
|
+
@connection = AllQ::Connection.new(url)
|
96
|
+
@get_action = AllQ::Get.new(@connection, self)
|
97
|
+
@put_action = AllQ::Put.new(@connection, self)
|
98
|
+
@done_action = AllQ::Done.new(@connection, self)
|
99
|
+
@stats_action = AllQ::Stats.new(@connection, self)
|
100
|
+
@release_action = AllQ::Release.new(@connection, self)
|
101
|
+
@touch_action = AllQ::Touch.new(@connection, self)
|
102
|
+
@kick_action = AllQ::Kick.new(@connection, self)
|
103
|
+
@bury_action = AllQ::Bury.new(@connection, self)
|
104
|
+
@clear_action = AllQ::Clear.new(@connection, self)
|
105
|
+
@peek_action = AllQ::Peek.new(@connection, self)
|
106
|
+
@delete_action = AllQ::Delete.new(@connection, self)
|
107
|
+
@parent_job_action = AllQ::ParentJob.new(@connection, self)
|
108
|
+
end
|
109
|
+
|
101
110
|
|
102
111
|
end
|
103
112
|
end
|
data/lib/allq/job.rb
CHANGED
data/lib/allq/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|