phobos_db_checkpoint 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/phobos_db_checkpoint/actions/retry_failure.rb +16 -8
- data/lib/phobos_db_checkpoint/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea63b526570ad002da5a794c62996da502e5c1a0
|
4
|
+
data.tar.gz: aa0d11a57a7b1a8e1e4fae8cbf2b44b355a8820c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29faf1557b51e8f2f018a1e909bfef242835407be93852b248a349a800ace8e0c095cf431e79c9bc9608393d04b9d11c672e7402584d485759f507267dd238af
|
7
|
+
data.tar.gz: 41ba356743214315af3435827c92d5772fd4fcc0ad54f7d0549d0ffcbbd82a6f964ff431b716b885dff038fcbe24f6b87abcb393a7028ec683fc1c31b0193438
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## 2.1.0 (2017-03-07)
|
8
|
+
|
9
|
+
- [enhancement] When retrying failures, an event is created if they return an ack
|
10
|
+
|
7
11
|
## 2.0.0 (2017-03-01)
|
8
12
|
|
9
13
|
- [enhancement] Rename tables
|
@@ -1,23 +1,31 @@
|
|
1
1
|
module PhobosDBCheckpoint
|
2
2
|
class RetryFailure
|
3
|
+
include PhobosDBCheckpoint::Handler
|
4
|
+
|
3
5
|
def initialize(failure)
|
4
6
|
@failure = failure
|
7
|
+
@action_taken = nil
|
5
8
|
end
|
6
9
|
|
7
10
|
def perform
|
8
|
-
|
11
|
+
self
|
12
|
+
.class
|
13
|
+
.around_consume(payload, metadata) do
|
14
|
+
@action_taken = handler.consume(payload, metadata)
|
15
|
+
end
|
16
|
+
|
9
17
|
@failure.destroy
|
10
|
-
|
18
|
+
@action_taken
|
11
19
|
end
|
12
20
|
|
13
21
|
private
|
14
22
|
|
15
|
-
def
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
23
|
+
def payload
|
24
|
+
@failure.payload.to_json
|
25
|
+
end
|
26
|
+
|
27
|
+
def metadata
|
28
|
+
@failure.metadata.merge(retry_count: 0)
|
21
29
|
end
|
22
30
|
|
23
31
|
def handler
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phobos_db_checkpoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Túlio Ornelas
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2017-03-
|
16
|
+
date: 2017-03-08 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: bundler
|