weel 1.99.129 → 1.99.131
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weel.rb +23 -32
- data/weel.gemspec +1 -1
- 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: c1bd5d96af8cbfad938bd5bd98a6fbccd61b63e59a234daf8f2c72b9f9a105aa
|
4
|
+
data.tar.gz: 8719914b17a95be381f73a19035923e31175648269d19b7534eea89849befa58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5aadbf31e025bf2fe221654b90a0694862670f094e31727dd2f201c2da953e754c118e8a28e51c8c8c85f2ee4ec373bf9326222479362b4e14f3570cf6631ff
|
7
|
+
data.tar.gz: ea7636318c8ecab9e7ac87fd73c2722b88724bf07e7c33be30cde8cfe3dd435199fd03ef835da0549760e8c1d621c59d9dc7ec54c579cc5b4b6a36faf5e5d93d
|
data/lib/weel.rb
CHANGED
@@ -355,9 +355,8 @@ class WEEL
|
|
355
355
|
def activity_passthrough_value; end
|
356
356
|
def activity_uuid; '42424242-cpee-cpee-cpee-424242424242'; end
|
357
357
|
|
358
|
-
def activity_no_longer_necessary; end
|
359
|
-
|
360
358
|
def inform_activity_done; end
|
359
|
+
def inform_activity_cancelled; end
|
361
360
|
def inform_activity_manipulate; end
|
362
361
|
def inform_activity_failed(err); end
|
363
362
|
def inform_manipulate_change(status,changed_data,changed_endpoints,data,endpoints); end
|
@@ -380,8 +379,8 @@ class WEEL
|
|
380
379
|
end
|
381
380
|
end
|
382
381
|
|
383
|
-
def join_branches(branches); end
|
384
|
-
def split_branches(branches); end
|
382
|
+
def join_branches(id,branches=[]); end
|
383
|
+
def split_branches(id,branches=[]); end
|
385
384
|
end # }}}
|
386
385
|
|
387
386
|
class Position # {{{
|
@@ -534,7 +533,7 @@ class WEEL
|
|
534
533
|
end
|
535
534
|
|
536
535
|
cw = @__weel_connectionwrapper.new @__weel_connectionwrapper_args
|
537
|
-
cw.split_branches
|
536
|
+
cw.split_branches Thread.current.__id__, Thread.current[:branch_traces]
|
538
537
|
|
539
538
|
Thread.current[:branches].each do |thread|
|
540
539
|
# decide after executing block in parallel cause for coopis
|
@@ -547,7 +546,7 @@ class WEEL
|
|
547
546
|
|
548
547
|
Thread.current[:branch_event].wait unless self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped || Thread.current[:branches].length == 0
|
549
548
|
|
550
|
-
cw.join_branches
|
549
|
+
cw.join_branches Thread.current.__id__, Thread.current[:branch_traces]
|
551
550
|
|
552
551
|
unless self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped
|
553
552
|
# first set all to no_longer_neccessary, just in case, but this should not be necessary
|
@@ -635,9 +634,11 @@ class WEEL
|
|
635
634
|
Thread.current[:alternative_mode] << mode
|
636
635
|
|
637
636
|
cw = @__weel_connectionwrapper.new @__weel_connectionwrapper_args
|
638
|
-
cw.split_branches(Thread.current[:branch_traces])
|
639
637
|
|
638
|
+
cw.split_branches Thread.current.__id__
|
640
639
|
__weel_protect_yield(&block)
|
640
|
+
cw.join_branches Thread.current.__id__
|
641
|
+
|
641
642
|
Thread.current[:alternative_executed].pop
|
642
643
|
Thread.current[:alternative_mode].pop
|
643
644
|
nil
|
@@ -754,16 +755,6 @@ class WEEL
|
|
754
755
|
self.__weel_state = :stopping
|
755
756
|
end #}}}
|
756
757
|
|
757
|
-
def status # {{{
|
758
|
-
@__weel_status
|
759
|
-
end # }}}
|
760
|
-
def data # {{{
|
761
|
-
ReadOnlyHash.new(@__weel_data)
|
762
|
-
end # }}}
|
763
|
-
def endpoints # {{{
|
764
|
-
ReadHash.new(@__weel_endpoints)
|
765
|
-
end # }}}
|
766
|
-
|
767
758
|
private
|
768
759
|
def __weel_protect_yield(*local) #{{{
|
769
760
|
begin
|
@@ -898,7 +889,6 @@ class WEEL
|
|
898
889
|
waitingresult = Thread.current[:continue].wait unless Thread.current[:nolongernecessary] || self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped
|
899
890
|
|
900
891
|
if Thread.current[:nolongernecessary]
|
901
|
-
connectionwrapper.activity_no_longer_necessary
|
902
892
|
raise Signal::NoLongerNecessary
|
903
893
|
end
|
904
894
|
if self.__weel_state == :stopping || self.__weel_state == :finishing
|
@@ -912,7 +902,11 @@ class WEEL
|
|
912
902
|
code, cmess = if waitingresult == WEEL::Signal::UpdateAgain
|
913
903
|
[update, 'update']
|
914
904
|
elsif waitingresult == WEEL::Signal::Salvage
|
915
|
-
|
905
|
+
if salvage
|
906
|
+
[salvage, 'salvage']
|
907
|
+
else
|
908
|
+
raise('HTTP Error. The service return status was not between 200 and 300.')
|
909
|
+
end
|
916
910
|
else
|
917
911
|
[finalize, 'finalize']
|
918
912
|
end
|
@@ -933,6 +927,8 @@ class WEEL
|
|
933
927
|
@__weel_endpoints
|
934
928
|
)
|
935
929
|
throw(Signal::Again, Signal::Again) if ma.nil? || ma == Signal::Again # this signal again loops "there is a catch" because rescue signal throw that throughly restarts the task
|
930
|
+
else
|
931
|
+
|
936
932
|
end
|
937
933
|
end while waitingresult == Signal::UpdateAgain # this signal again loops because async update, proposal: rename to UpdateAgain
|
938
934
|
if connectionwrapper.activity_passthrough_value.nil?
|
@@ -951,6 +947,7 @@ class WEEL
|
|
951
947
|
wp.detail = :unmark
|
952
948
|
end
|
953
949
|
rescue Signal::NoLongerNecessary
|
950
|
+
connectionwrapper.inform_activity_cancelled
|
954
951
|
connectionwrapper.inform_activity_done
|
955
952
|
@__weel_positions.delete wp
|
956
953
|
Thread.current[:branch_position] = nil
|
@@ -1064,7 +1061,7 @@ class WEEL
|
|
1064
1061
|
def __weel_state=(newState)# {{{
|
1065
1062
|
return @__weel_state if newState == @__weel_state && @__weel_state != :ready
|
1066
1063
|
|
1067
|
-
@__weel_positions = Array.new if newState == :running
|
1064
|
+
@__weel_positions = Array.new if newState == :running
|
1068
1065
|
@__weel_state = newState
|
1069
1066
|
|
1070
1067
|
if newState == :stopping || newState == :finishing
|
@@ -1145,7 +1142,7 @@ public
|
|
1145
1142
|
@dslr.__weel_state = :stopping
|
1146
1143
|
@dslr.__weel_connectionwrapper::inform_syntax_error(@dslr.__weel_connectionwrapper_args,err,code)
|
1147
1144
|
end
|
1148
|
-
if @dslr.__weel_state == :running || @dslr.__weel_state == :finishing
|
1145
|
+
if @dslr.__weel_state == :running || @dslr.__weel_state == :finishing
|
1149
1146
|
ipc = { :unmark => [] }
|
1150
1147
|
@dslr.__weel_positions.each{ |wp| ipc[:unmark] << wp }
|
1151
1148
|
@dslr.__weel_positions.clear
|
@@ -1204,7 +1201,7 @@ public
|
|
1204
1201
|
# Stop the workflow execution
|
1205
1202
|
def stop # {{{
|
1206
1203
|
Thread.new do
|
1207
|
-
if @dslr.__weel_state == :running
|
1204
|
+
if @dslr.__weel_state == :running
|
1208
1205
|
@dslr.__weel_state = :stopping
|
1209
1206
|
@dslr.__weel_main.join if @dslr.__weel_main
|
1210
1207
|
elsif @dslr.__weel_state == :ready || @dslr.__weel_state == :stopped
|
@@ -1226,18 +1223,12 @@ public
|
|
1226
1223
|
end
|
1227
1224
|
end
|
1228
1225
|
end # }}}
|
1229
|
-
|
1226
|
+
|
1230
1227
|
def sim # {{{
|
1231
|
-
|
1228
|
+
stat = @dslr.__weel_state
|
1229
|
+
return nil unless stat == :ready || stat == :stopped
|
1232
1230
|
@dslr.__weel_main = Thread.new do
|
1233
|
-
|
1234
|
-
begin
|
1235
|
-
__weel_control_flow(:simulating, stat)
|
1236
|
-
rescue => e
|
1237
|
-
puts e.message
|
1238
|
-
puts e.backtrace
|
1239
|
-
connectionwrapper::inform_connectionwrapper_error connectionwrapper_args, e
|
1240
|
-
end
|
1231
|
+
__weel_control_flow :simulating, stat
|
1241
1232
|
end
|
1242
1233
|
end # }}}
|
1243
1234
|
|
data/weel.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.99.
|
4
|
+
version: 1.99.131
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-10-
|
12
|
+
date: 2024-10-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.5.
|
103
|
+
rubygems_version: 3.5.16
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Workflow Execution Engine Library (WEEL)
|