rbbt-util 5.21.122 → 5.21.123
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/util/concurrency/processes/worker.rb +1 -1
- data/lib/rbbt/util/misc/inspect.rb +6 -2
- data/lib/rbbt/workflow/accessor.rb +3 -0
- data/lib/rbbt/workflow/step.rb +1 -1
- data/lib/rbbt/workflow/step/dependencies.rb +3 -3
- data/lib/rbbt/workflow/step/run.rb +3 -2
- data/share/workflow_config.ru +15 -0
- 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: 7d9b73ef742e367384eeec735b980ad4ef809bf3
|
4
|
+
data.tar.gz: 3a2d1e5c49ccbb386c4bbe42b57cc031c6271010
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0460b59b327c793efaddfe14f3109a4b34ff5346b48c0284ec9d55e5f66cdaf3e508472ac5e554ab13aff8af9716230c05f10dbac81b93a3aaaa977832ce08c7
|
7
|
+
data.tar.gz: 01606ac902c2c9da0ee2bc24c46ca83483ce1b67d55af4ab0bc84d111d551a4ff3d2daf3907970feb6510c5f3040061a5951ba842449f8f25c5f5c6b9e9d4a0f
|
@@ -85,7 +85,7 @@ class RbbtProcessQueue
|
|
85
85
|
if current > memory_cap and not @asked
|
86
86
|
Log.medium "Worker #{@current} for #{Process.pid} asked to respawn -- initial: #{initial} - multiplier: #{multiplier} - cap: #{memory_cap} - current: #{current}"
|
87
87
|
RbbtSemaphore.synchronize(@callback_queue.write_sem) do
|
88
|
-
Process.kill "USR1", @current
|
88
|
+
Process.kill "USR1", @current if @current
|
89
89
|
end
|
90
90
|
@asked = true
|
91
91
|
end
|
@@ -61,7 +61,9 @@ module Misc
|
|
61
61
|
when (defined? AnnotatedArray and AnnotatedArray)
|
62
62
|
"<A: #{fingerprint Annotated.purge(obj)} #{fingerprint obj.info}>"
|
63
63
|
when (defined? TSV and TSV::Parser)
|
64
|
-
|
64
|
+
filename = obj.filename
|
65
|
+
filename = "STDIN(#{rand})" if filename == '-'
|
66
|
+
"<TSVStream:" + (filename || "NOFILENAME") + "--" << Misc.fingerprint(obj.options) << ">"
|
65
67
|
when IO
|
66
68
|
(obj.respond_to?(:filename) and obj.filename ) ? "<IO:" + (obj.filename || obj.inspect + rand(100000)) + ">" : obj.inspect
|
67
69
|
when File
|
@@ -106,7 +108,9 @@ module Misc
|
|
106
108
|
when obj.respond_to?(:path)
|
107
109
|
remove_long_items("File: " + obj.path)
|
108
110
|
when TSV::Parser === obj
|
109
|
-
|
111
|
+
filename = obj.filename
|
112
|
+
filename = "STDIN(rand-#{rand(10000000)})" if filename == '-'
|
113
|
+
remove_long_items("TSV Stream: " + filename + " -- " << Misc.fingerprint(obj.options))
|
110
114
|
when TSV === obj
|
111
115
|
remove_long_items((obj.all_fields || []) + obj.keys.sort)
|
112
116
|
when (Array === obj and obj.length > ARRAY_MAX_LENGTH)
|
data/lib/rbbt/workflow/step.rb
CHANGED
@@ -286,7 +286,7 @@ class Step
|
|
286
286
|
status << "dirty" if done? && dirty?
|
287
287
|
status << "not running" if ! done? && ! running?
|
288
288
|
status.unshift " " if status.any?
|
289
|
-
Log.
|
289
|
+
Log.high "Cleaning step: #{path}#{status * " "}"
|
290
290
|
abort if ! done? && running?
|
291
291
|
Step.clean(path)
|
292
292
|
self
|
@@ -82,9 +82,9 @@ class Step
|
|
82
82
|
|
83
83
|
if (status == 'error' && (job.recoverable_error? || job.dirty?)) ||
|
84
84
|
job.aborted? ||
|
85
|
-
(job.done? && ! job.updated?) || (job.error? && ! job.updated?)
|
86
|
-
(job.done? && job.dirty?) || (job.error? && job.dirty?)
|
87
|
-
(!
|
85
|
+
(job.done? && ! job.updated?) || (job.error? && ! job.updated?) ||
|
86
|
+
(job.done? && job.dirty?) || (job.error? && job.dirty?) ||
|
87
|
+
(!(job.noinfo? || job.done? || job.error? || job.aborted? || job.running?))
|
88
88
|
|
89
89
|
job.clean
|
90
90
|
end
|
@@ -25,6 +25,7 @@ class Step
|
|
25
25
|
begin
|
26
26
|
if Step === i
|
27
27
|
step = true
|
28
|
+
i.produce unless i.done? || i.error? || i.started?
|
28
29
|
if i.done?
|
29
30
|
if (task.input_options[task.inputs[pos]] || {})[:stream]
|
30
31
|
TSV.get_stream i
|
@@ -114,8 +115,8 @@ class Step
|
|
114
115
|
end
|
115
116
|
end
|
116
117
|
|
117
|
-
Log.
|
118
|
-
Log.
|
118
|
+
Log.high "Some newer files found: #{Misc.fingerprint outdated_time}" if outdated_time.any?
|
119
|
+
Log.high "Some outdated files found: #{Misc.fingerprint outdated_dep}" if outdated_dep.any?
|
119
120
|
|
120
121
|
outdated_time + outdated_dep
|
121
122
|
end
|
data/share/workflow_config.ru
CHANGED
@@ -115,6 +115,21 @@ if etc_dir['target_workflow_exec_exports'].exists?
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
118
|
+
app.get '/reload_workflow' do
|
119
|
+
if production?
|
120
|
+
halt 500, "Not allowed in production"
|
121
|
+
end
|
122
|
+
|
123
|
+
workflow = params[:workflow] if params[:workflow]
|
124
|
+
wf_file = Workflow.local_workflow_filename(workflow)
|
125
|
+
wf_dir = File.dirname(wf_file)
|
126
|
+
$LOADED_FEATURES.delete_if do |path|
|
127
|
+
Misc.path_relative_to(wf_dir, path)
|
128
|
+
end
|
129
|
+
load wf_file
|
130
|
+
halt 200, "Workflow #{ workflow } reloaded"
|
131
|
+
end
|
132
|
+
|
118
133
|
#{{{ RUN
|
119
134
|
require 'rack'
|
120
135
|
use Rack::Deflater
|
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.21.
|
4
|
+
version: 5.21.123
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|