cyclone_lariat 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +0 -2
- data/CHANGELOG.md +7 -4
- data/Gemfile.lock +1 -1
- data/lib/cyclone_lariat/errors.rb +4 -0
- data/lib/cyclone_lariat/middleware.rb +11 -0
- data/lib/cyclone_lariat/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: 9a416593e31f7f6fd67eb7e453971b5867d9169bdb37e5708876fdea03b8021f
|
4
|
+
data.tar.gz: 6ba164622a11d2bd4d63214ba391372bfda1c5447d8979332ef66a4e9e9d2c75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7fe001ac8bfc6f373d2f9e7eeb8be68bdea77bca68d4c7b9a7af36c41fd606e82fff5355fc0757e6b4c0b8ca7b00798a7f90c47b3b1a8d141b519389747a117
|
7
|
+
data.tar.gz: 19f361ff6fa6509439f8aa6122f743175678c81aee9948b71e5f2fb4e3ab8f852b86920fdcbd656c16a3ac1c30705c4da96c542c2e4a373ab012040544128049
|
data/CHANGELOG.md
CHANGED
@@ -4,16 +4,19 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
-
## [0.2.
|
7
|
+
## [0.2.3] - 2021-06-09
|
8
|
+
Added
|
9
|
+
- Skip on empty message with error notify
|
10
|
+
|
11
|
+
## [0.2.2] - 2021-06-08
|
8
12
|
Changed
|
9
13
|
- Fix save to database
|
10
14
|
- Rename error to client error
|
11
15
|
|
12
|
-
## [0.2.1] - 2021-06-
|
13
|
-
Changed
|
16
|
+
## [0.2.1] - 2021-06-02
|
14
17
|
- Fix can load from database if error_details is nil
|
15
18
|
|
16
|
-
## [0.2.0] - 2021-06-
|
19
|
+
## [0.2.0] - 2021-06-02
|
17
20
|
Added
|
18
21
|
- Complete tests
|
19
22
|
- Production ready
|
data/Gemfile.lock
CHANGED
@@ -5,6 +5,10 @@ require 'luna_park/errors/business'
|
|
5
5
|
|
6
6
|
module CycloneLariat
|
7
7
|
module Errors
|
8
|
+
class EmptyMessage < LunaPark::Errors::System
|
9
|
+
message 'Received message is empty'
|
10
|
+
end
|
11
|
+
|
8
12
|
class TopicNotFound < LunaPark::Errors::System
|
9
13
|
message { |d| "Could not found topic: `#{d[:expected_topic]}`" }
|
10
14
|
end
|
@@ -16,6 +16,8 @@ module CycloneLariat
|
|
16
16
|
log_received_message queue, body
|
17
17
|
|
18
18
|
catch_standard_error(queue, body) do
|
19
|
+
return true unless check(body[:Message])
|
20
|
+
|
19
21
|
event = Event.wrap(JSON.parse(body[:Message]))
|
20
22
|
|
21
23
|
catch_business_error(event) do
|
@@ -54,5 +56,14 @@ module CycloneLariat
|
|
54
56
|
errors_notifier&.error(e, queue: queue, aws_message_id: body[:MessageId], message: body[:Message])
|
55
57
|
raise e
|
56
58
|
end
|
59
|
+
|
60
|
+
def check(msg)
|
61
|
+
if msg.nil? || msg.empty?
|
62
|
+
errors_notifier&.error(Errors::EmptyMessage.new)
|
63
|
+
false
|
64
|
+
else
|
65
|
+
true
|
66
|
+
end
|
67
|
+
end
|
57
68
|
end
|
58
69
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyclone_lariat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kudrin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-06-
|
12
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-sns
|