rbbt-util 5.26.71 → 5.26.72
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/rest/client.rb +0 -1
- data/lib/rbbt/rest/client/get.rb +5 -1
- data/lib/rbbt/rest/client/run.rb +25 -12
- data/share/rbbt_commands/app/start +1 -0
- data/share/rbbt_commands/benchmark/throughput +2 -0
- data/share/rbbt_commands/workflow/install +3 -0
- data/share/rbbt_commands/workflow/task +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48218a636227053649451600d1225572ad96f01ed39d67fbf42a1f8f8c7c7c77
|
4
|
+
data.tar.gz: 612183134de313b8a3dd986faf314d2593ce95c7a2c17d8146d5cdf6eb5b5ff9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de75682521e5fa1ada0d0f1e3fca19bd20ad6d877abe1a070c6244e7de6a22d7f2564d89308b9a27a7a0de7ab150f4aa58566f78a4bbe89c3fdcd695e262998c
|
7
|
+
data.tar.gz: 017f12231eaf26f807b00a5317f656b2694f70c9cf38cc4044648abdd313c2083124cd49120fb08550700d297d7807fb4a26defc69aa55c4143fd2c23fcc3c87
|
data/lib/rbbt/rest/client.rb
CHANGED
@@ -43,7 +43,6 @@ class WorkflowRESTClient
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
|
47
46
|
stream_input = @can_stream ? task_info(task)[:input_options].select{|k,o| o[:stream] }.collect{|k,o| k }.first : nil
|
48
47
|
RemoteStep.new(url, task, name, fixed_inputs, task_info[:result_type], task_info[:result_description], @exec_exports.include?(task), @stream_exports.include?(task), stream_input)
|
49
48
|
end
|
data/lib/rbbt/rest/client/get.rb
CHANGED
@@ -84,7 +84,11 @@ class WorkflowRESTClient
|
|
84
84
|
res = capture_exception do
|
85
85
|
Misc.insist(2, 0.5) do
|
86
86
|
Log.debug{ "RestClient clean: #{ url } - #{Misc.fingerprint params}" }
|
87
|
-
res =
|
87
|
+
res = begin
|
88
|
+
RestClient.get(self.encode(url), :params => params)
|
89
|
+
rescue RestClient::NotFound
|
90
|
+
return nil
|
91
|
+
end
|
88
92
|
raise TryAgain if res.code == 202
|
89
93
|
res
|
90
94
|
end
|
data/lib/rbbt/rest/client/run.rb
CHANGED
@@ -69,7 +69,6 @@ class WorkflowRESTClient::RemoteStep
|
|
69
69
|
err.rewind
|
70
70
|
err.read
|
71
71
|
end
|
72
|
-
iii text
|
73
72
|
ne = WorkflowRESTClient.parse_exception text
|
74
73
|
case ne
|
75
74
|
when String
|
@@ -82,23 +81,37 @@ class WorkflowRESTClient::RemoteStep
|
|
82
81
|
end
|
83
82
|
end
|
84
83
|
|
85
|
-
|
84
|
+
task_params.each do |k,v|
|
85
|
+
task_params[k] = v.read if IO === v
|
86
|
+
end
|
87
|
+
|
88
|
+
Log.debug{ "RestClient execute: #{ task_url } - #{Misc.fingerprint task_params}" }
|
86
89
|
RestClient::Request.execute(:method => :post, :url => task_url, :payload => task_params, :block_response => bl)
|
87
90
|
end
|
88
91
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
92
|
+
# It seems like now response body are now decoded by Net::HTTP after 2.1
|
93
|
+
# https://github.com/rest-client/rest-client/blob/cf3e5a115bcdb8f3344aeac0e45b44d67fac1a42/history.md
|
94
|
+
decode = Gem.loaded_specs["rest-client"].version < Gem::Version.create('2.1')
|
95
|
+
if decode
|
96
|
+
reader = Zlib::GzipReader.new(sout)
|
97
|
+
res_io = Misc.open_pipe do |sin|
|
98
|
+
while c = reader.read(Misc::BLOCK_SIZE)
|
99
|
+
sin.write c
|
100
|
+
end
|
101
|
+
sin.close
|
102
|
+
@done = true
|
103
|
+
end
|
104
|
+
ConcurrentStream.setup(res_io, :threads => [post_thread]) do
|
105
|
+
@done = true
|
106
|
+
@streaming = false
|
107
|
+
end
|
108
|
+
else
|
109
|
+
ConcurrentStream.setup(sout, :threads => [post_thread]) do
|
110
|
+
@done = true
|
111
|
+
@streaming = false
|
93
112
|
end
|
94
|
-
sin.close
|
95
|
-
@done = true
|
96
113
|
end
|
97
114
|
|
98
|
-
ConcurrentStream.setup(res_io, :threads => [post_thread]) do
|
99
|
-
@done = true
|
100
|
-
@streaming = false
|
101
|
-
end
|
102
115
|
end
|
103
116
|
end
|
104
117
|
|
@@ -18,6 +18,9 @@ repo is not specified then 'http://github.com/Rbbt-Workflows/' will be used. If
|
|
18
18
|
the workflow is already installed it will be updated. If 'all' is specified
|
19
19
|
instead of a particular workflow, all installed workflows will be updated.
|
20
20
|
|
21
|
+
You can set the environment variable RBBT_WORKFLOW_AUTOINSTALL=true to make
|
22
|
+
workflows install automatically as required.
|
23
|
+
|
21
24
|
-h--help Print this help
|
22
25
|
|
23
26
|
EOF
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.26.
|
4
|
+
version: 5.26.72
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|