lex-tasker 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66a34f6cf6d57469672d12a3985bd2cb6c6fb923255e462c7b4c62e501cc1d50
4
- data.tar.gz: 5ecf2cc2e2e10a7883f83531a6d2671eda1df0046958309f4cdd9e95df135137
3
+ metadata.gz: 80c817d10dbe0cf26a7f378fffc59ac5e5014041061aa34cb77a6f78be072948
4
+ data.tar.gz: 1b4723077b8a74fba897368d030876c644c648d9c7bfc234e3aa9cc532efa4de
5
5
  SHA512:
6
- metadata.gz: 83ccbfc89f17cfe6df72366e8c81b2d7a3dc4aa6808b18ec1e3ca96d96e679f3d2f3bdaf022c502b48daea980f09dd76200d695ec0a1790b359e69fbd2b36616
7
- data.tar.gz: 5b6c3f87eeadaebbea428b80eb2c5ffa6a0408f28b298120206304b9dc2a11521231f32257ec5ef43eb264996b7447a588bb1c1123070c560b77bc1bfd0d2fa0
6
+ metadata.gz: 5f63de1378dce2b6cf329df1240e49dce9423ef8de8aa907ae0881dc630450127882421c683eae64497d56d5ba76b21bd81eefe3d356f42e29baf29ef952c940
7
+ data.tar.gz: d37ebfa0f4126370e8e142222146fa98e87d5f2ba5d6118c3de4298b1851aed56a15759286ee14624260865576bb194a5b40682cdd50773d5abf0a7aba2fd80b
@@ -12,6 +12,10 @@ module Legion::Extensions::Tasker
12
12
  def generate_task?
13
13
  false
14
14
  end
15
+
16
+ def use_runner?
17
+ false
18
+ end
15
19
  end
16
20
  end
17
21
  end
@@ -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.where(namespace: runner_class).first
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.where(name: function).first
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)
@@ -1,7 +1,7 @@
1
1
  module Legion
2
2
  module Extensions
3
3
  module Tasker
4
- VERSION = '0.1.1'.freeze
4
+ VERSION = '0.1.2'.freeze
5
5
  end
6
6
  end
7
7
  end
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.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-08-24 00:00:00.000000000 Z
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
- - legion-extensions-tasker.gemspec
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