lex-tasker 0.3.6 → 0.3.8
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/CHANGELOG.md +11 -0
- data/lib/legion/extensions/tasker/helpers/task_finder.rb +2 -2
- data/lib/legion/extensions/tasker/runners/check_subtask.rb +2 -2
- data/lib/legion/extensions/tasker/runners/fetch_delayed.rb +1 -1
- data/lib/legion/extensions/tasker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d76ee37e0384b05461bb96c12b973df17f5a0bd950be7edf636ec5c81d008480
|
|
4
|
+
data.tar.gz: 2432e93d827dbf09596ffa965b67457fe2fe29570ab2e72be33a0fe66f3277c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cab4deab705051107b02d1ef03e655e648ce0d15f33a39fa7a40af10a163c51cb6bffd9b0775cc8f7a68c87f7133593921fefa36f9f5c816ff554c627538596e
|
|
7
|
+
data.tar.gz: ec791ab74fefa0bff01ee6653ce99e913ed91e4a2a23a6a582175a93e9e1b326116eb3c33fc83cc313878602aa050d047614085ff8dc1a8d75931780f78e2c8e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.8] - 2026-03-31
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- type guard cache returns in `find_trigger` (must be Hash) and `find_subtasks` (must be Array) — cache deserialization can return String instead of Hash, causing `TypeError: no implicit conversion of Symbol into Integer`
|
|
7
|
+
- `check_subtasks` guard changed from `unless trigger` to `unless trigger.is_a?(Hash)` for same reason
|
|
8
|
+
|
|
9
|
+
## [0.3.7] - 2026-03-30
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- guard against `no implicit conversion of Symbol into Integer` in `send_task` — check `opts[:result].is_a?(Hash)` before accessing `[:success]` in both CheckSubtask and FetchDelayed runners
|
|
13
|
+
|
|
3
14
|
## [0.3.6] - 2026-03-30
|
|
4
15
|
|
|
5
16
|
### Fixed
|
|
@@ -26,7 +26,7 @@ module Legion
|
|
|
26
26
|
|
|
27
27
|
cache_key = "find_trigger:#{runner_class}:#{function}"
|
|
28
28
|
cached = cache_get(cache_key)
|
|
29
|
-
return cached
|
|
29
|
+
return cached if cached.is_a?(Hash)
|
|
30
30
|
|
|
31
31
|
result = Legion::Data::Model::Function
|
|
32
32
|
.join(:runners, id: :runner_id)
|
|
@@ -46,7 +46,7 @@ module Legion
|
|
|
46
46
|
|
|
47
47
|
cache_key = "find_subtasks:#{trigger_id}"
|
|
48
48
|
cached = cache_get(cache_key)
|
|
49
|
-
return cached
|
|
49
|
+
return cached if cached.is_a?(Array)
|
|
50
50
|
|
|
51
51
|
results = subtask_query(trigger_id).all.map do |row|
|
|
52
52
|
row[:runner_routing_key] = "#{row[:exchange]}.#{row[:queue]}.#{row[:function]}"
|
|
@@ -12,7 +12,7 @@ module Legion
|
|
|
12
12
|
|
|
13
13
|
def check_subtasks(runner_class:, function:, **opts)
|
|
14
14
|
trigger = find_trigger(runner_class: runner_class, function: function)
|
|
15
|
-
return { success: true, subtasks: 0 } unless trigger
|
|
15
|
+
return { success: true, subtasks: 0 } unless trigger.is_a?(Hash)
|
|
16
16
|
|
|
17
17
|
find_subtasks(trigger_id: trigger[:function_id]).each do |relationship|
|
|
18
18
|
next unless chain_matches?(relationship, opts)
|
|
@@ -78,7 +78,7 @@ module Legion
|
|
|
78
78
|
def send_task(**opts)
|
|
79
79
|
opts[:results] = opts[:result] if opts.key?(:result) && !opts.key?(:results)
|
|
80
80
|
opts[:success] = if opts.key?(:result) && opts.key?(:success)
|
|
81
|
-
opts[:result][:success]
|
|
81
|
+
opts[:result].is_a?(Hash) ? opts[:result][:success] : opts[:success]
|
|
82
82
|
elsif opts.key?(:success)
|
|
83
83
|
opts[:success]
|
|
84
84
|
else
|
|
@@ -64,7 +64,7 @@ module Legion
|
|
|
64
64
|
def send_task(**opts)
|
|
65
65
|
opts[:results] = opts[:result] if opts.key?(:result) && !opts.key?(:results)
|
|
66
66
|
opts[:success] = if opts.key?(:result) && opts.key?(:success)
|
|
67
|
-
opts[:result][:success]
|
|
67
|
+
opts[:result].is_a?(Hash) ? opts[:result][:success] : opts[:success]
|
|
68
68
|
elsif opts.key?(:success)
|
|
69
69
|
opts[:success]
|
|
70
70
|
else
|