smart_proxy_dynflow 0.6.1 → 0.6.2

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: 3f3493966a6909232bc66c339f43bbf92a5fe816a12fa2ecd3f2a619b6ada735
4
- data.tar.gz: e5c8ef258353c72e1d453c1dce1f97e12e25c2e12a59b2fdb3a317067c179ab9
3
+ metadata.gz: 993736ce6d5ac64679839ee2b724956021f823904893863d13e22483e7ad5f48
4
+ data.tar.gz: 98299433eff4fb8c382c5cbb9cd74f5e0f062ff2c595ce14638e012329c3f560
5
5
  SHA512:
6
- metadata.gz: 25b9acceec9b4ba73f1e93cb8f9e0ad24fdb04d1f404304fa417c3ad84d81904f9cca562350031fbbce964bee076d5451ccde9c4a132546cc3fb7f2c9621737b
7
- data.tar.gz: 6f02401a1eb65179772b0592856acb125cb53197e067d6fcabdcad98581d221052390b0bdb42fa39f1dae1e14de4d8be5b9c6aab28272423756ffeb1f72a82ac
6
+ metadata.gz: ef12614f425197f81ca6675b62194035a1f63a74e83865b1d1423b9e24ff7a1571b86634a5fd247756b3e035198909ce289455423a5be7f04918e7c6275b1032
7
+ data.tar.gz: f7d8da665d8e958cca84309cd887b50dc5fc2959e1b5df7302ce398d8da49a3eea5549793bfc1665b4369846da6a46e20048d265d371aafa586d3c301f24ad69
@@ -0,0 +1,17 @@
1
+ module Proxy::Dynflow::Action
2
+ module WithExternalPolling
3
+ Poll = Algebrick.atom
4
+
5
+ def run(event = nil)
6
+ if event.is_a?(Poll)
7
+ poll
8
+ suspend
9
+ else
10
+ super
11
+ end
12
+ end
13
+
14
+ def poll
15
+ end
16
+ end
17
+ end
@@ -74,7 +74,7 @@ module Proxy::Dynflow
74
74
  end
75
75
 
76
76
  def output_result
77
- stored_output_chunks.map { |c| c[:chunk] }.reduce([], &:concat)
77
+ (stored_output_chunks + (@pending_output_chunks || [])).map { |c| c[:chunk] }.reduce([], &:concat)
78
78
  end
79
79
  end
80
80
  end
@@ -0,0 +1,46 @@
1
+ # TypeProf 0.21.2
2
+
3
+ # Classes
4
+ module Proxy
5
+ module Dynflow
6
+ class IOBuffer
7
+ @callback: nil
8
+
9
+ attr_accessor io: nil
10
+ attr_reader buffer: String
11
+ def initialize: (nil io) -> void
12
+ def on_data: -> nil
13
+ def to_io: -> IO
14
+ def to_s: -> String
15
+ def empty?: -> bool
16
+ def closed?: -> untyped
17
+ def close: -> nil
18
+ def read_available!: -> nil
19
+ def write_available!: -> nil
20
+ def add_data: (untyped data) -> String
21
+
22
+ private
23
+ def with_callback: (String? data) -> String?
24
+ end
25
+
26
+ class ProcessManager
27
+ @command: untyped
28
+
29
+ attr_reader stdin: IOBuffer
30
+ attr_reader stdout: IOBuffer
31
+ attr_reader stderr: IOBuffer
32
+ attr_reader pid: Integer
33
+ attr_reader status: Integer?
34
+ def initialize: (untyped command) -> void
35
+ def run!: -> ProcessManager
36
+ def start!: -> String
37
+ def started?: -> bool
38
+ def done?: -> bool
39
+ def close: -> [IOBuffer, IOBuffer, IOBuffer]
40
+ def process: (?timeout: nil) -> Array[untyped]?
41
+ def finish: -> Integer?
42
+ def on_stdout: -> nil
43
+ def on_stderr: -> nil
44
+ end
45
+ end
46
+ end
@@ -1,5 +1,5 @@
1
1
  module Proxy
2
2
  module Dynflow
3
- VERSION = '0.6.1'.freeze
3
+ VERSION = '0.6.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_dynflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-03 00:00:00.000000000 Z
11
+ date: 2022-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynflow
@@ -153,6 +153,7 @@ files:
153
153
  - lib/smart_proxy_dynflow/action/batch.rb
154
154
  - lib/smart_proxy_dynflow/action/batch_callback.rb
155
155
  - lib/smart_proxy_dynflow/action/batch_runner.rb
156
+ - lib/smart_proxy_dynflow/action/external_polling.rb
156
157
  - lib/smart_proxy_dynflow/action/output_collector.rb
157
158
  - lib/smart_proxy_dynflow/action/runner.rb
158
159
  - lib/smart_proxy_dynflow/action/shareable.rb
@@ -167,6 +168,7 @@ files:
167
168
  - lib/smart_proxy_dynflow/middleware/keep_current_request_id.rb
168
169
  - lib/smart_proxy_dynflow/otp_manager.rb
169
170
  - lib/smart_proxy_dynflow/plugin.rb
171
+ - lib/smart_proxy_dynflow/process_manager.rbs
170
172
  - lib/smart_proxy_dynflow/proxy_adapter.rb
171
173
  - lib/smart_proxy_dynflow/runner.rb
172
174
  - lib/smart_proxy_dynflow/runner/base.rb