weel 1.99.90 → 1.99.95
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 +22 -15
- 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: 641444781be26b938868f6115466c81870c175948bd664a4b8f4abe2ffd8f4ab
|
4
|
+
data.tar.gz: eee050aca5dcb0a5002cbd7b5eb6274d6dc0ed33b50ef89c634b8d4754c2ef43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '029b33aa91638408cf9994fccb389fda6e0660f02e81fad6bcb2fe2901c6d316e72a3dd2ef9dd6d2ba3ffbff627c8f17820b50db6c27b0a5c16c7860f96ab14e'
|
7
|
+
data.tar.gz: a760a8b4665d0587dde85638c680d0277b95de0e0c4a829dab502dcffa0f9f1241d553a942659594b4b825a56c5388679a04ee16f0098ffd82bc490993a07d7b
|
data/lib/weel.rb
CHANGED
@@ -238,7 +238,7 @@ class WEEL
|
|
238
238
|
end # }}}
|
239
239
|
|
240
240
|
class HandlerWrapperBase # {{{
|
241
|
-
def self::loop_guard(lid,count); false; end
|
241
|
+
def self::loop_guard(arguments,lid,count); false; end
|
242
242
|
def self::inform_state_change(arguments,newstate); end
|
243
243
|
def self::inform_syntax_error(arguments,err,code); end
|
244
244
|
def self::inform_handlerwrapper_error(arguments,err); end
|
@@ -636,7 +636,7 @@ class WEEL
|
|
636
636
|
searchmode = __weel_is_in_search_mode(position)
|
637
637
|
return if searchmode
|
638
638
|
return if self.__weel_state == :stopping || self.__weel_state == :finishing || self.__weel_state == :stopped || Thread.current[:nolongernecessary]
|
639
|
-
__weel_progress
|
639
|
+
__weel_progress position, true
|
640
640
|
self.__weel_state = :stopping
|
641
641
|
end #}}}
|
642
642
|
|
@@ -681,8 +681,9 @@ class WEEL
|
|
681
681
|
end
|
682
682
|
end #}}}
|
683
683
|
|
684
|
-
def __weel_progress(
|
684
|
+
def __weel_progress(position, skip=false) #{{{
|
685
685
|
ipc = {}
|
686
|
+
branch = Thread.current
|
686
687
|
if Thread.current[:branch_parent] && Thread.current[:branch_parent][:branch_position]
|
687
688
|
@__weel_positions.delete Thread.current[:branch_parent][:branch_position]
|
688
689
|
ipc[:unmark] ||= []
|
@@ -694,15 +695,21 @@ class WEEL
|
|
694
695
|
ipc[:unmark] ||= []
|
695
696
|
ipc[:unmark] << Thread.current[:branch_position] rescue nil
|
696
697
|
end
|
697
|
-
wp =
|
698
|
+
wp = if branch[:branch_search_now] == true
|
699
|
+
branch[:branch_search_now] = false
|
700
|
+
WEEL::Position.new(position, skip ? :after : :at, @__weel_search_positions[position]&.passthrough)
|
701
|
+
else
|
702
|
+
WEEL::Position.new(position, skip ? :after : :at)
|
703
|
+
end
|
698
704
|
ipc[skip ? :after : :at] = [wp]
|
699
705
|
|
706
|
+
@__weel_search_positions.delete(position)
|
700
707
|
@__weel_search_positions.each do |k,ele| # some may still be in active search but lets unmark them for good measure
|
701
708
|
ipc[:unmark] ||= []
|
702
709
|
ipc[:unmark] << ele
|
703
710
|
true
|
704
711
|
end
|
705
|
-
ipc[:unmark].uniq!
|
712
|
+
ipc[:unmark].uniq! if ipc[:unmark]
|
706
713
|
|
707
714
|
@__weel_positions << wp
|
708
715
|
Thread.current[:branch_position] = wp
|
@@ -726,7 +733,7 @@ class WEEL
|
|
726
733
|
return
|
727
734
|
end
|
728
735
|
|
729
|
-
wp = __weel_progress
|
736
|
+
wp = __weel_progress position
|
730
737
|
|
731
738
|
# searchmode position is after, jump directly to vote_sync_after
|
732
739
|
raise Signal::Proceed if searchmode == :after
|
@@ -772,13 +779,7 @@ class WEEL
|
|
772
779
|
raise Signal::Stop unless handlerwrapper.vote_sync_before(params)
|
773
780
|
raise Signal::Skip if self.__weel_state == :stopping || self.__weel_state == :finishing
|
774
781
|
|
775
|
-
|
776
|
-
passthrough = @__weel_search_positions[position].passthrough
|
777
|
-
@__weel_search_positions[position].passthrough = nil
|
778
|
-
else
|
779
|
-
passthrough = nil
|
780
|
-
end
|
781
|
-
handlerwrapper.activity_handle passthrough, params
|
782
|
+
handlerwrapper.activity_handle wp.passthrough, params
|
782
783
|
wp.passthrough = handlerwrapper.activity_passthrough_value
|
783
784
|
unless wp.passthrough.nil?
|
784
785
|
@__weel_handlerwrapper::inform_position_change @__weel_handlerwrapper_args, :wait => [wp]
|
@@ -923,9 +924,11 @@ class WEEL
|
|
923
924
|
|
924
925
|
if position && @__weel_search_positions.include?(position) # matching searchpos => start execution from here
|
925
926
|
branch[:branch_search] = false # execute all activities in THIS branch (thread) after this point
|
927
|
+
branch[:branch_search_now] = true # just now did we switch the search mode
|
926
928
|
while branch.key?(:branch_parent) # also all parent branches should execute activities after this point, additional branches spawned by parent branches should still be in search mode
|
927
929
|
branch = branch[:branch_parent]
|
928
930
|
branch[:branch_search] = false
|
931
|
+
branch[:branch_search_now] = true # just now did we switch the search mode
|
929
932
|
end
|
930
933
|
@__weel_search_positions[position].detail == :after
|
931
934
|
else
|
@@ -1101,8 +1104,12 @@ public
|
|
1101
1104
|
# Stop the workflow execution
|
1102
1105
|
def stop # {{{
|
1103
1106
|
Thread.new do
|
1104
|
-
@dslr.__weel_state
|
1105
|
-
|
1107
|
+
if @dslr.__weel_state == :running
|
1108
|
+
@dslr.__weel_state = :stopping
|
1109
|
+
@dslr.__weel_main.join if @dslr.__weel_main
|
1110
|
+
elsif @dslr.__weel_state == :ready || dslr.__weel_state == :stopped
|
1111
|
+
@dslr.__weel_state = :stopped
|
1112
|
+
end
|
1106
1113
|
end
|
1107
1114
|
end # }}}
|
1108
1115
|
# Start the workflow execution
|
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.95
|
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: 2020-
|
12
|
+
date: 2020-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|