lex-tasker 0.1.1 → 0.1.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80c817d10dbe0cf26a7f378fffc59ac5e5014041061aa34cb77a6f78be072948
|
4
|
+
data.tar.gz: 1b4723077b8a74fba897368d030876c644c648d9c7bfc234e3aa9cc532efa4de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f63de1378dce2b6cf329df1240e49dce9423ef8de8aa907ae0881dc630450127882421c683eae64497d56d5ba76b21bd81eefe3d356f42e29baf29ef952c940
|
7
|
+
data.tar.gz: d37ebfa0f4126370e8e142222146fa98e87d5f2ba5d6118c3de4298b1851aed56a15759286ee14624260865576bb194a5b40682cdd50773d5abf0a7aba2fd80b
|
File without changes
|
@@ -6,10 +6,10 @@ module Legion::Extensions::Tasker
|
|
6
6
|
include Legion::Extensions::Helpers::Lex
|
7
7
|
|
8
8
|
def check_subtasks(runner_class:, function:, **opts)
|
9
|
-
runner_record = Legion::Data::Model::Runner
|
9
|
+
runner_record = Legion::Data::Model::Runner[namespace: runner_class]
|
10
10
|
return if runner_record.nil?
|
11
11
|
|
12
|
-
function_record = runner_record.functions_dataset
|
12
|
+
function_record = runner_record.functions_dataset[name: function]
|
13
13
|
return if function_record.nil?
|
14
14
|
|
15
15
|
relationships = function_record.trigger_relationships_dataset.where(:active)
|
@@ -93,6 +93,14 @@ module Legion::Extensions::Tasker
|
|
93
93
|
results: opts[:result]
|
94
94
|
}
|
95
95
|
|
96
|
+
subtask_hash[:routing_key] = if subtask_hash[:conditions].is_a?(String) && subtask_hash[:conditioners].length > 4 # rubocop:disable Layout/LineLength
|
97
|
+
'task.subtask.conditioner'
|
98
|
+
elsif subtask_hash[:transformation].is_a?(String) && subtask_hash[:transformation].length > 4 # rubocop:disable Layout/LineLength
|
99
|
+
'task.subtask.transform'
|
100
|
+
else
|
101
|
+
"#{runner_record.extension.values[:exchange]}.#{runner_record.values[:queue]}.#{subtask_hash[:function]}" # rubocop:disable Layout/LineLength
|
102
|
+
end
|
103
|
+
|
96
104
|
subtask_hash[:success] = if opts.nil?
|
97
105
|
1
|
98
106
|
elsif opts.key?(:result)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lex-tasker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miverson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -111,7 +111,7 @@ files:
|
|
111
111
|
- Rakefile
|
112
112
|
- bin/console
|
113
113
|
- bin/setup
|
114
|
-
-
|
114
|
+
- lex-tasker.gemspec
|
115
115
|
- lib/legion/extensions/tasker.rb
|
116
116
|
- lib/legion/extensions/tasker/actors/check_subtask.rb
|
117
117
|
- lib/legion/extensions/tasker/actors/fetch_delayed.rb
|