strum-pipeline 0.2.1 → 0.2.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 +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/lib/strum/pipeline/version.rb +1 -1
- data/lib/strum/pipeline.rb +10 -3
- 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: 6baedd0bf4dd58d4b40ed9e8a0f5549bea66b67eed85dba35bb28572489da72d
|
|
4
|
+
data.tar.gz: e7ccc89bf36eda404d95f5a2f155a1fbb589848035b20c0e710038a4684523ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6ce24968a4e232d2093114154a53d956f3af7a332e8bade0aef180f8c5cb19c44d83128c2a9b2553dcb620d9a37f621de89deefc63a90a820c802f3ec0c95f2
|
|
7
|
+
data.tar.gz: 5ed805498082ae9c3799beb7132b05dea20909aa5b46473a62143059c0dbcac8aa4caac3d133822efa9034c942600b7ca4d0a4b0c4175c27bde2b6fd5e546ac6
|
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
# Changelog
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [0.2.
|
|
5
|
+
## [0.2.2] - 2023-04-25
|
|
6
|
+
### Added
|
|
7
|
+
- `bind_to_pipeline` setting to be able to define if strum-pipeline binds init/steps to pipeline or not by [@valeriia.kolisnyk].
|
|
8
|
+
|
|
9
|
+
## [0.2.1] - 2023-04-20
|
|
6
10
|
### Changed
|
|
7
11
|
- `strum-esb` dependency version to `~> 0.4` by [@valeriia.kolisnyk].
|
|
8
12
|
|
data/Gemfile.lock
CHANGED
data/lib/strum/pipeline.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require "strum/pipeline/version"
|
|
4
4
|
require "redis/objects"
|
|
5
|
-
require
|
|
5
|
+
require "connection_pool"
|
|
6
6
|
require "strum/esb"
|
|
7
7
|
require "strum/pipeline/storage"
|
|
8
8
|
require "dry/configurable"
|
|
@@ -18,6 +18,7 @@ module Strum
|
|
|
18
18
|
port: ENV.fetch("PIPELINE_REDIS_PORT", "6379"),
|
|
19
19
|
db: ENV.fetch("PIPELINE_REDIS_DB", "0")
|
|
20
20
|
}
|
|
21
|
+
setting :bind_to_pipeline, true
|
|
21
22
|
# setting :redis_connection_pool
|
|
22
23
|
|
|
23
24
|
Strum::Esb.config.after_fork_hooks << proc do
|
|
@@ -68,16 +69,22 @@ module Strum
|
|
|
68
69
|
Strum::Pipeline.config.ttl = interval
|
|
69
70
|
end
|
|
70
71
|
|
|
72
|
+
def bind_to_pipeline(value)
|
|
73
|
+
Strum::Pipeline.config.bind_to_pipeline = value
|
|
74
|
+
end
|
|
75
|
+
|
|
71
76
|
def inits
|
|
72
77
|
@inits ||= []
|
|
73
78
|
end
|
|
74
|
-
|
|
79
|
+
|
|
75
80
|
def init(message_type, message_binding, handler = nil)
|
|
76
|
-
bind_to(pipeline_name, message_type, message_binding, handler)
|
|
81
|
+
bind_to(pipeline_name, message_type, message_binding, handler) if Strum::Pipeline.config.bind_to_pipeline
|
|
77
82
|
inits << handler_key(message_type, message_binding)
|
|
78
83
|
end
|
|
79
84
|
|
|
80
85
|
def step(message_type, message_binding, handler = nil)
|
|
86
|
+
return unless Strum::Pipeline.config.bind_to_pipeline
|
|
87
|
+
|
|
81
88
|
bind_to(pipeline_name, message_type, message_binding, handler) do |bindings|
|
|
82
89
|
bindings[:pipeline] ||= {}
|
|
83
90
|
bindings[:pipeline][:name] = pipeline_name
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: strum-pipeline
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Serhiy Nazarov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-04-
|
|
11
|
+
date: 2023-04-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bunny
|