weel 1.99.128 → 1.99.129
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 +4 -4
- data/lib/weel.rb +71 -63
- data/weel.gemspec +1 -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: 52a9d1b00bfbd9df62e95f290c520c447b8cb2bb4d4add32efa2b7ec2e31fc54
|
4
|
+
data.tar.gz: 8d0d3bb0a413fb1ad7a2d81ea63c2eade55e5f0173045daaced8f495fc6f1de0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cce8bf3f578fd2700c317a011437fc6f806f5b4b51d335473a041c3e0253fa06e981d9dfd00edebbae8c9cad1b8a1bbfe20e4afab3445b1549eda6cab18b5281
|
7
|
+
data.tar.gz: 8497d993333e112bf56c4431040ca454ee8eeeb57f6fd9437abe9c6deac2b6115c0b672aa28e8ce2f47d23dcc5b5f6226315fd6e0d9f01d7507bfe1460c48b86
|
data/lib/weel.rb
CHANGED
@@ -875,70 +875,72 @@ class WEEL
|
|
875
875
|
@__weel_connectionwrapper::inform_position_change @__weel_connectionwrapper_args, :after => [wp]
|
876
876
|
end
|
877
877
|
when :call
|
878
|
-
|
879
|
-
connectionwrapper
|
880
|
-
params = connectionwrapper.prepare(@__weel_lock,@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional,prepare,endpoint,parameters)
|
881
|
-
|
882
|
-
raise Signal::Stop unless connectionwrapper.vote_sync_before(params)
|
883
|
-
raise Signal::Skip if self.__weel_state == :stopping || self.__weel_state == :finishing
|
884
|
-
|
885
|
-
connectionwrapper.activity_handle wp.passthrough, params
|
886
|
-
wp.passthrough = connectionwrapper.activity_passthrough_value
|
887
|
-
unless wp.passthrough.nil?
|
888
|
-
@__weel_connectionwrapper::inform_position_change @__weel_connectionwrapper_args, :wait => [wp]
|
889
|
-
end
|
890
|
-
begin
|
891
|
-
# cleanup after callback updates
|
878
|
+
begin
|
879
|
+
again = catch Signal::Again do # Will be nil if we do not throw (using default connectionwrapper)
|
892
880
|
connectionwrapper.mem_guard
|
881
|
+
params = connectionwrapper.prepare(@__weel_lock,@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional,prepare,endpoint,parameters)
|
893
882
|
|
894
|
-
|
895
|
-
|
896
|
-
waitingresult = nil
|
897
|
-
waitingresult = Thread.current[:continue].wait unless Thread.current[:nolongernecessary] || self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped
|
883
|
+
raise Signal::Stop unless connectionwrapper.vote_sync_before(params)
|
884
|
+
raise Signal::Skip if self.__weel_state == :stopping || self.__weel_state == :finishing
|
898
885
|
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
if self.__weel_state == :stopping || self.__weel_state == :finishing
|
904
|
-
connectionwrapper.activity_stop
|
905
|
-
wp.passthrough = connectionwrapper.activity_passthrough_value
|
906
|
-
raise Signal::Proceed if wp.passthrough # if stop, but no passthrough, let manipulate happen and then stop
|
886
|
+
connectionwrapper.activity_handle wp.passthrough, params
|
887
|
+
wp.passthrough = connectionwrapper.activity_passthrough_value
|
888
|
+
unless wp.passthrough.nil?
|
889
|
+
@__weel_connectionwrapper::inform_position_change @__weel_connectionwrapper_args, :wait => [wp]
|
907
890
|
end
|
891
|
+
begin
|
892
|
+
# cleanup after callback updates
|
893
|
+
connectionwrapper.mem_guard
|
894
|
+
|
895
|
+
# with loop if catching Signal::Again
|
896
|
+
# handshake call and wait until it finished
|
897
|
+
waitingresult = nil
|
898
|
+
waitingresult = Thread.current[:continue].wait unless Thread.current[:nolongernecessary] || self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped
|
899
|
+
|
900
|
+
if Thread.current[:nolongernecessary]
|
901
|
+
connectionwrapper.activity_no_longer_necessary
|
902
|
+
raise Signal::NoLongerNecessary
|
903
|
+
end
|
904
|
+
if self.__weel_state == :stopping || self.__weel_state == :finishing
|
905
|
+
connectionwrapper.activity_stop
|
906
|
+
wp.passthrough = connectionwrapper.activity_passthrough_value
|
907
|
+
raise Signal::Proceed if wp.passthrough # if stop, but no passthrough, let manipulate happen and then stop
|
908
|
+
end
|
908
909
|
|
909
|
-
|
910
|
+
next if waitingresult == WEEL::Signal::UpdateAgain && connectionwrapper.activity_result_value&.length == 0
|
910
911
|
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
912
|
+
code, cmess = if waitingresult == WEEL::Signal::UpdateAgain
|
913
|
+
[update, 'update']
|
914
|
+
elsif waitingresult == WEEL::Signal::Salvage
|
915
|
+
[salvage, 'salvage'] || raise('HTTP Error. The service return status was not between 200 and 300.')
|
916
|
+
else
|
917
|
+
[finalize, 'finalize']
|
918
|
+
end
|
919
|
+
if code.is_a?(String)
|
920
|
+
connectionwrapper.inform_activity_manipulate
|
921
|
+
struct = nil
|
922
|
+
|
923
|
+
# when you throw without parameters, ma contains nil, so we return Signal::Proceed to give ma a meaningful value in other cases
|
924
|
+
ma = catch Signal::Again do
|
925
|
+
struct = connectionwrapper.manipulate(false,@__weel_lock,@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional,code,'Activity ' + position.to_s + ' ' + cmess,connectionwrapper.activity_result_value,connectionwrapper.activity_result_options)
|
926
|
+
Signal::Proceed
|
927
|
+
end
|
928
|
+
connectionwrapper.inform_manipulate_change(
|
929
|
+
((struct && struct.changed_status) ? @__weel_status : nil),
|
930
|
+
((struct && struct.changed_data.any?) ? struct.changed_data.uniq : nil),
|
931
|
+
((struct && struct.changed_endpoints.any?) ? struct.changed_endpoints.uniq : nil),
|
932
|
+
@__weel_data,
|
933
|
+
@__weel_endpoints
|
934
|
+
)
|
935
|
+
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
|
926
936
|
end
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
)
|
934
|
-
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
|
937
|
+
end while waitingresult == Signal::UpdateAgain # this signal again loops because async update, proposal: rename to UpdateAgain
|
938
|
+
if connectionwrapper.activity_passthrough_value.nil?
|
939
|
+
connectionwrapper.inform_activity_done
|
940
|
+
wp.passthrough = nil
|
941
|
+
wp.detail = :after
|
942
|
+
@__weel_connectionwrapper::inform_position_change @__weel_connectionwrapper_args, :after => [wp]
|
935
943
|
end
|
936
|
-
end while waitingresult == Signal::UpdateAgain # this signal again loops because async update, proposal: rename to UpdateAgain
|
937
|
-
if connectionwrapper.activity_passthrough_value.nil?
|
938
|
-
connectionwrapper.inform_activity_done
|
939
|
-
wp.passthrough = nil
|
940
|
-
wp.detail = :after
|
941
|
-
@__weel_connectionwrapper::inform_position_change @__weel_connectionwrapper_args, :after => [wp]
|
942
944
|
end
|
943
945
|
end while again == Signal::Again # there is a catch
|
944
946
|
end
|
@@ -1062,7 +1064,7 @@ class WEEL
|
|
1062
1064
|
def __weel_state=(newState)# {{{
|
1063
1065
|
return @__weel_state if newState == @__weel_state && @__weel_state != :ready
|
1064
1066
|
|
1065
|
-
@__weel_positions = Array.new if newState == :running
|
1067
|
+
@__weel_positions = Array.new if newState == :running || @dslr.__weel_state == :simulating
|
1066
1068
|
@__weel_state = newState
|
1067
1069
|
|
1068
1070
|
if newState == :stopping || newState == :finishing
|
@@ -1143,7 +1145,7 @@ public
|
|
1143
1145
|
@dslr.__weel_state = :stopping
|
1144
1146
|
@dslr.__weel_connectionwrapper::inform_syntax_error(@dslr.__weel_connectionwrapper_args,err,code)
|
1145
1147
|
end
|
1146
|
-
if @dslr.__weel_state == :running || @dslr.__weel_state == :finishing
|
1148
|
+
if @dslr.__weel_state == :running || @dslr.__weel_state == :finishing || @dslr.__weel_state == :simulating
|
1147
1149
|
ipc = { :unmark => [] }
|
1148
1150
|
@dslr.__weel_positions.each{ |wp| ipc[:unmark] << wp }
|
1149
1151
|
@dslr.__weel_positions.clear
|
@@ -1202,7 +1204,7 @@ public
|
|
1202
1204
|
# Stop the workflow execution
|
1203
1205
|
def stop # {{{
|
1204
1206
|
Thread.new do
|
1205
|
-
if @dslr.__weel_state == :running
|
1207
|
+
if @dslr.__weel_state == :running || @dslr.__weel_state == :simulating
|
1206
1208
|
@dslr.__weel_state = :stopping
|
1207
1209
|
@dslr.__weel_main.join if @dslr.__weel_main
|
1208
1210
|
elsif @dslr.__weel_state == :ready || @dslr.__weel_state == :stopped
|
@@ -1224,12 +1226,18 @@ public
|
|
1224
1226
|
end
|
1225
1227
|
end
|
1226
1228
|
end # }}}
|
1227
|
-
|
1229
|
+
# Sim the workflow execution
|
1228
1230
|
def sim # {{{
|
1229
|
-
|
1230
|
-
return nil unless stat == :ready || stat == :stopped
|
1231
|
+
return nil if @dslr.__weel_state != :ready && @dslr.__weel_state != :stopped
|
1231
1232
|
@dslr.__weel_main = Thread.new do
|
1232
|
-
|
1233
|
+
Thread.current[:branch_search] = true if @dslr.__weel_search_positions.any?
|
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
|
1233
1241
|
end
|
1234
1242
|
end # }}}
|
1235
1243
|
|
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.129
|
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-
|
12
|
+
date: 2024-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|