dirty_pipeline 0.6.3 → 0.6.4
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/dirty_pipeline/base.rb +1 -1
- data/lib/dirty_pipeline/transition.rb +6 -6
- data/lib/dirty_pipeline/version.rb +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: 39b6905344a3e533c084d66709bc992996351b5ca52b1a49bd995ab5159ea7eb
|
4
|
+
data.tar.gz: 19176034e183e583454c99ddb72309ef1ee7b7e2db05de9d9affadae5d652dfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e4ed6d5dbfc6f015ad05065a2e571481f979d7d70265da262a8a7d8a650a09a6e6c8d99671fdd3f07ab320442022075d90db51c148f1b5d1e9fd172047a8fba
|
7
|
+
data.tar.gz: d1e2a3f6a925add414c6935448986c272d618a2d5f9783016406385d30d3e566b455ea5c66d054df16900b23bfe9f0c567a2fe758884c64aadb2d3eb42bf4ed2
|
data/lib/dirty_pipeline/base.rb
CHANGED
@@ -85,7 +85,7 @@ module DirtyPipeline
|
|
85
85
|
execute(load_event(enqueued_event), attempt_retry: true)
|
86
86
|
end
|
87
87
|
|
88
|
-
def schedule(operation, delay = nil)
|
88
|
+
def schedule(operation = "call", delay = nil)
|
89
89
|
job_args = {
|
90
90
|
"transaction_id" => @uuid,
|
91
91
|
"enqueued_pipeline" => self.class.to_s,
|
@@ -1,16 +1,16 @@
|
|
1
1
|
module DirtyPipeline
|
2
2
|
class Transition
|
3
3
|
def Failure(error)
|
4
|
-
railway
|
4
|
+
railway&.switch_to(:undo)
|
5
5
|
throw :fail_transition, error
|
6
6
|
end
|
7
7
|
|
8
8
|
def Success(changes = nil)
|
9
|
-
case railway
|
9
|
+
case railway&.active
|
10
10
|
when "call"
|
11
|
-
railway
|
11
|
+
railway&.switch_to(:finalize) if respond_to?(:finalize)
|
12
12
|
when "finalize"
|
13
|
-
railway
|
13
|
+
railway&.switch_to(:call)
|
14
14
|
end
|
15
15
|
throw :success, changes.to_h
|
16
16
|
end
|
@@ -31,8 +31,8 @@ module DirtyPipeline
|
|
31
31
|
def self.call(*args, **kwargs)
|
32
32
|
event, pipeline, *args = args
|
33
33
|
instance = new(event, pipeline.railway, *args, **kwargs)
|
34
|
-
pipeline
|
35
|
-
pipeline
|
34
|
+
pipeline&.railway&.send(:[], :undo)&.send(:<<, event)
|
35
|
+
pipeline&.railway&.send(:[], :finalize)&.send(:<<, event)
|
36
36
|
instance.call(pipeline.subject)
|
37
37
|
end
|
38
38
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dirty_pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Dolganov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|