allq 0.3.94 → 0.3.95
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/add_server.rb +20 -0
- data/lib/allq/actions/drain.rb +20 -0
- data/lib/allq/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d29595de0c34b5832f6a0731b9b6e02d3ac8e78531dc956dcab0698bcc018d4e
|
4
|
+
data.tar.gz: 0bda272bb8b65535a72ff92ea2048bfbd103f0c27406a80f0403cc1d0e4909f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78ce71eb97fdf6789480225f0b406cae816c27e1f1b3e7a41f88eb70edf5b8dadd22c243ebbc7c12f7cd4f6ef1a1a9d3a40ed3439abf66d070754b963e878dd6
|
7
|
+
data.tar.gz: 9e3f8eedf209527fd5311ce1f6a52579e0492dd01471471bf34df1c8463278c20a52bfebd9520c5583ad9ab8420b3808b54e6848e1f8a1d3304b9d9efc4caf6d
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class AllQ
|
2
|
+
class AddServer < AllQ::Base
|
3
|
+
|
4
|
+
def snd(data)
|
5
|
+
server_url = data[:server_url]
|
6
|
+
send_data = base_send(server_url)
|
7
|
+
response = send_hash_as_json(send_data, true)
|
8
|
+
rcv(response)
|
9
|
+
end
|
10
|
+
|
11
|
+
def base_send(server_url)
|
12
|
+
{
|
13
|
+
'action' => 'add_server',
|
14
|
+
'params' => {
|
15
|
+
'server_url' => server_url
|
16
|
+
}
|
17
|
+
}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class AllQ
|
2
|
+
class Drain < AllQ::Base
|
3
|
+
|
4
|
+
def snd(data)
|
5
|
+
server_id = data[:server_id]
|
6
|
+
send_data = base_send(server_id)
|
7
|
+
response = send_hash_as_json(send_data, true)
|
8
|
+
rcv(response)
|
9
|
+
end
|
10
|
+
|
11
|
+
def base_send(server_id)
|
12
|
+
{
|
13
|
+
'action' => 'drain',
|
14
|
+
'params' => {
|
15
|
+
'server_id' => server_id
|
16
|
+
}
|
17
|
+
}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/allq/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.95
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason
|
@@ -71,11 +71,13 @@ files:
|
|
71
71
|
- bin/console
|
72
72
|
- bin/setup
|
73
73
|
- lib/allq.rb
|
74
|
+
- lib/allq/actions/add_server.rb
|
74
75
|
- lib/allq/actions/base.rb
|
75
76
|
- lib/allq/actions/bury.rb
|
76
77
|
- lib/allq/actions/clear.rb
|
77
78
|
- lib/allq/actions/delete.rb
|
78
79
|
- lib/allq/actions/done.rb
|
80
|
+
- lib/allq/actions/drain.rb
|
79
81
|
- lib/allq/actions/get.rb
|
80
82
|
- lib/allq/actions/kick.rb
|
81
83
|
- lib/allq/actions/parent_job.rb
|