pub_sub_model_sync 1.7.0 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +6 -38
- data/Gemfile.lock +1 -1
- data/lib/pub_sub_model_sync/message_processor.rb +6 -8
- data/lib/pub_sub_model_sync/message_publisher.rb +9 -6
- data/lib/pub_sub_model_sync/transaction.rb +0 -2
- data/lib/pub_sub_model_sync/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: 982f8035fef9e312858a0283b2d1be71280a279ed6681b5ed2487a004b313363
|
4
|
+
data.tar.gz: 8a227b2aa781f1a7613e44f7e907bc3f01316d46246b7cc6bb60283ed38764a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc7648e4cd28c450fb2c8725b345a80e969b97417463b825fbe8b5663b4b62a5ae46c2849fbcca03573c54ba293ea5eed8e7ccd82264828031a7409efd07092e
|
7
|
+
data.tar.gz: c9ce313096c204ab367bbb8b5860c26d5170a9abe21ea25ed25caab1bb5df6a42f0969112bc3e8bd382c47d1f5edf6831beb28793301f05a2c3423585b9b5b60
|
@@ -1,43 +1,11 @@
|
|
1
|
+
name: Create release from tag
|
1
2
|
on:
|
2
3
|
push:
|
3
|
-
tags: #
|
4
|
+
tags: # Create a release once a git tag is published
|
4
5
|
- '*'
|
5
6
|
|
6
|
-
name: Create Release
|
7
|
-
|
8
7
|
jobs:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
- name: Checkout code
|
14
|
-
uses: actions/checkout@v2
|
15
|
-
with:
|
16
|
-
fetch-depth: 0
|
17
|
-
|
18
|
-
# Changelog action adaptations
|
19
|
-
- name: Create required package.json
|
20
|
-
run: test -f package.json || echo '{}' >package.json
|
21
|
-
- name: Detect Previous Tag (action not detecting very well)
|
22
|
-
run: echo "::set-output name=previous_tag::$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)"
|
23
|
-
id: tag_checker
|
24
|
-
|
25
|
-
- name: Generate Changelog
|
26
|
-
uses: scottbrenner/generate-changelog-action@master
|
27
|
-
id: Changelog
|
28
|
-
with:
|
29
|
-
from-tag: ${{steps.tag_checker.outputs.previous_tag}}
|
30
|
-
to-tag: HEAD
|
31
|
-
|
32
|
-
- name: Create Release
|
33
|
-
id: create_release
|
34
|
-
uses: actions/create-release@latest
|
35
|
-
env:
|
36
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
37
|
-
with:
|
38
|
-
tag_name: ${{ github.ref }}
|
39
|
-
release_name: Release ${{ github.ref }}
|
40
|
-
body: |
|
41
|
-
${{ steps.Changelog.outputs.changelog }}
|
42
|
-
draft: false
|
43
|
-
prerelease: false
|
8
|
+
release-builder:
|
9
|
+
uses: owen2345/reusable-ci-cd-actions/.github/workflows/release_builder_from_tag.yml@main
|
10
|
+
with:
|
11
|
+
commit_mode: true # If true, then fetches all commit titles from all changes. If false, then fetches only the PR titles from all changes.
|
data/Gemfile.lock
CHANGED
@@ -21,12 +21,14 @@ module PubSubModelSync
|
|
21
21
|
log("No subscribers found for #{payload_info}", :warn) if config.debug && subscribers.empty?
|
22
22
|
subscribers.each(&method(:run_subscriber))
|
23
23
|
rescue => e
|
24
|
-
|
24
|
+
print_error(e)
|
25
25
|
raise
|
26
26
|
end
|
27
27
|
|
28
28
|
def process
|
29
|
-
process!
|
29
|
+
process!
|
30
|
+
rescue => e
|
31
|
+
config.on_error_processing.call(e, { payload: payload })
|
30
32
|
end
|
31
33
|
|
32
34
|
private
|
@@ -51,14 +53,10 @@ module PubSubModelSync
|
|
51
53
|
end
|
52
54
|
|
53
55
|
# @param error (StandardError, Exception)
|
54
|
-
def
|
55
|
-
error_msg = 'Error processing message:
|
56
|
+
def print_error(error)
|
57
|
+
error_msg = 'Error processing message:'
|
56
58
|
error_details = [payload, error.message, error.backtrace]
|
57
|
-
res = config.on_error_processing.call(error, { payload: payload })
|
58
|
-
log("#{error_msg} #{error_details}", :error) if res != :skip_log
|
59
|
-
rescue => e
|
60
59
|
log("#{error_msg} #{error_details}", :error)
|
61
|
-
raise(e)
|
62
60
|
end
|
63
61
|
|
64
62
|
# @param error [StandardError]
|
@@ -81,14 +81,16 @@ module PubSubModelSync
|
|
81
81
|
block&.call
|
82
82
|
payload
|
83
83
|
rescue => e
|
84
|
-
|
84
|
+
print_error(e, payload)
|
85
85
|
raise
|
86
86
|
end
|
87
87
|
|
88
88
|
# Similar to :publish! method but ignores the error if failed
|
89
89
|
# @return Payload
|
90
90
|
def publish(payload, &block)
|
91
|
-
publish!(payload, &block)
|
91
|
+
publish!(payload, &block)
|
92
|
+
rescue => e
|
93
|
+
config.on_error_publish.call(e, { payload: payload })
|
92
94
|
end
|
93
95
|
|
94
96
|
def connector_publish(payload)
|
@@ -124,10 +126,11 @@ module PubSubModelSync
|
|
124
126
|
!cancelled
|
125
127
|
end
|
126
128
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
129
|
+
# @param error (StandardError, Exception)
|
130
|
+
def print_error(error, payload)
|
131
|
+
error_msg = 'Error publishing:'
|
132
|
+
error_details = [payload, error.message, error.backtrace]
|
133
|
+
log("#{error_msg} #{error_details}", :error)
|
131
134
|
end
|
132
135
|
|
133
136
|
def define_transaction_key(payload)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pub_sub_model_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Owen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|