flor 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/lib/flor.rb +2 -1
- data/lib/flor/flor.rb +5 -0
- data/lib/flor/log.rb +11 -7
- data/lib/flor/punit/c_iterator.rb +1 -1
- data/lib/flor/punit/concurrence.rb +6 -5
- data/lib/flor/punit/{m_ram.rb → m_receive_and_merge.rb} +0 -0
- data/lib/flor/unit/caller_jruby.rb +8 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 553a980e772a1ce1d8990fc8d0744163b6615c5e9a4fe391d48ab73ac2219b2a
|
4
|
+
data.tar.gz: 7b922c56e568ac51cbb9cc3dbcb02c930984f94785ddd3b8ea76804ccff848de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc920c9d3f305e3e31f174ebbb5d8e7f935742a9b5bcd5a75b80646d5803746315e91e4937156a01f3fcc512c477b8770e6a665a86bd61a81120f0e305027652
|
7
|
+
data.tar.gz: 4dd48c11b6f59d2efc4aec15060d0c7db07541b1af4037dc8402b6ef701f43b88928aaaf3306e6ae0e1237a79f5fb360c992cf58648e26edb398f7adf843970e
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
Copyright (c) 2015-
|
2
|
+
Copyright (c) 2015-2021, John Mettraux, jmettraux+flor@gmail.com
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
# flor
|
3
3
|
|
4
|
-
[![
|
4
|
+
[![tests](https://github.com/floraison/flor/workflows/test/badge.svg)](https://github.com/floraison/flor/actions)
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/flor.svg)](http://badge.fury.io/rb/flor)
|
6
6
|
|
7
7
|
Flor is a "Ruby workflow engine", if that makes any sense.
|
data/lib/flor.rb
CHANGED
data/lib/flor/flor.rb
CHANGED
@@ -329,6 +329,11 @@ module Flor
|
|
329
329
|
isostamp(false, true, true, t)
|
330
330
|
end
|
331
331
|
|
332
|
+
def monow
|
333
|
+
|
334
|
+
Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
335
|
+
end
|
336
|
+
|
332
337
|
# def to_time(ts)
|
333
338
|
#
|
334
339
|
# m = ts.match(/\A(\d{4})(\d{2})(\d{2})\.(\d{2})(\d{2})(\d{2})(\d+)([uU]?)\z/)
|
data/lib/flor/log.rb
CHANGED
@@ -334,18 +334,22 @@ module Flor
|
|
334
334
|
n = executor.execution['nodes'][nid]
|
335
335
|
node = n ? Flor::Node.new(executor, n, m) : nil
|
336
336
|
|
337
|
-
o.puts "#{_c.
|
338
|
-
|
339
|
-
o.puts "#{_c.dg}
|
340
|
-
o.puts
|
341
|
-
|
337
|
+
o.puts "#{_c.rs}#{_c.dg}<Flor.msg_to_detail_s>"
|
338
|
+
|
339
|
+
o.puts "#{_c.dg}message:#{_c.yl}"
|
340
|
+
o.puts YAML.dump(m)
|
341
|
+
|
342
|
+
o.puts "#{_c.dg}tree:#{_c.yl}"
|
342
343
|
o.puts(tree_to_s(node.lookup_tree(nid), nid, out: o)) if node
|
344
|
+
|
343
345
|
o.puts "#{_c.dg}node:#{_c.yl}"
|
344
|
-
o.puts(
|
345
|
-
|
346
|
+
o.puts YAML.dump(n.merge('tree' => '(above)'))
|
347
|
+
|
348
|
+
o.puts "#{_c.dg}nodes:#{_c.yl}"
|
346
349
|
o.puts nods_to_s(executor, m, opts)
|
347
350
|
z = executor.execution['nodes'].size
|
348
351
|
o.puts "#{_c.yl}#{z} node#{z == 1 ? '' : 's'}."
|
352
|
+
|
349
353
|
o.puts "#{_c.dg}</Flor.msg_to_detail_s>#{_c.rs}"
|
350
354
|
|
351
355
|
o.string
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'flor/punit/
|
3
|
+
require 'flor/punit/m_receive_and_merge'
|
4
4
|
|
5
5
|
|
6
6
|
class Flor::Pro::Concurrence < Flor::Procedure
|
@@ -387,10 +387,11 @@ class Flor::Pro::Concurrence < Flor::Procedure
|
|
387
387
|
|
388
388
|
REWRITE_AS_ATTS = %w[
|
389
389
|
on_receive on_merge
|
390
|
-
child_on_error children_on_error
|
391
|
-
|
392
|
-
|
393
|
-
|
390
|
+
child_on_error children_on_error
|
391
|
+
].freeze
|
392
|
+
#
|
393
|
+
# heads of the child nodes that should get rewritten as attributes
|
394
|
+
# of the concurrence ...
|
394
395
|
|
395
396
|
def pre_execute_rewrite
|
396
397
|
|
File without changes
|
@@ -23,7 +23,7 @@ module Flor
|
|
23
23
|
@exitstatus = exitstatus
|
24
24
|
end
|
25
25
|
|
26
|
-
def pid; @process.pid; end
|
26
|
+
def pid; @process.pid; rescue; nil; end
|
27
27
|
end
|
28
28
|
|
29
29
|
def spawn(conf, data)
|
@@ -41,7 +41,7 @@ module Flor
|
|
41
41
|
henv.each { |k, v| builder.environment.put(k, v) }
|
42
42
|
|
43
43
|
process = builder.start
|
44
|
-
pid = process.pid
|
44
|
+
pid = process.respond_to?(:pid) ? process.pid : nil
|
45
45
|
|
46
46
|
o = process.outputStream.to_io
|
47
47
|
i = process.inputStream.to_io
|
@@ -61,10 +61,12 @@ module Flor
|
|
61
61
|
|
62
62
|
rescue => err
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
64
|
+
if pid
|
65
|
+
Process.detach(pid)
|
66
|
+
(Process.kill(9, pid) rescue nil) unless Flor.no?(conf['on_error_kill'])
|
67
|
+
else
|
68
|
+
process.destroy rescue nil
|
69
|
+
end
|
68
70
|
|
69
71
|
raise err if err.is_a?(SpawnError)
|
70
72
|
raise WrappedSpawnError.new(conf, { to: to, t0: t0, pid: pid }, err)
|
@@ -72,7 +74,6 @@ module Flor
|
|
72
74
|
ensure
|
73
75
|
|
74
76
|
[ i, o, f ].each { |x| x.close rescue nil }
|
75
|
-
|
76
77
|
end
|
77
78
|
|
78
79
|
module CmdParser include Raabro
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: munemo
|
@@ -237,7 +237,7 @@ files:
|
|
237
237
|
- lib/flor/punit/do_trap.rb
|
238
238
|
- lib/flor/punit/every.rb
|
239
239
|
- lib/flor/punit/graft.rb
|
240
|
-
- lib/flor/punit/
|
240
|
+
- lib/flor/punit/m_receive_and_merge.rb
|
241
241
|
- lib/flor/punit/on_timeout.rb
|
242
242
|
- lib/flor/punit/part.rb
|
243
243
|
- lib/flor/punit/schedule.rb
|