allq 0.3.94 → 0.3.95

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4c0da4315e0e69a822ece95505b46328d7bf5b7ad9c2d3231c03fbd49e18343
4
- data.tar.gz: cfa496a06e3a5b654ecf207429ed9f1b5594faf1863e128c658dbeaf1152ba97
3
+ metadata.gz: d29595de0c34b5832f6a0731b9b6e02d3ac8e78531dc956dcab0698bcc018d4e
4
+ data.tar.gz: 0bda272bb8b65535a72ff92ea2048bfbd103f0c27406a80f0403cc1d0e4909f3
5
5
  SHA512:
6
- metadata.gz: f2fd73c30d68d2256ee91c36e82e745dd94655181b5d65fdfe4993b687dd1ebe395b27704511268319e34dbd1dfc161fabb6aefb60d5e40e172fa98555461095
7
- data.tar.gz: 139eb3bc2f8418c59cf88ba6ef0ef0d2ceb56c027c0332c4a4730c66949117425292271bd16ec36eb47358bc6210d6544d5e19af6aa0de35516c4eee6a92a41e
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
@@ -1,3 +1,3 @@
1
1
  module Allq
2
- VERSION = "0.3.94"
2
+ VERSION = "0.3.95"
3
3
  end
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.94
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