pub_sub_model_sync 1.6.1pre → 1.6.1
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/Gemfile.lock +13 -13
- data/lib/pub_sub_model_sync/message_processor.rb +6 -5
- data/lib/pub_sub_model_sync/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7b82f843724eb07ce764e12b1b8293fbff447563865d85a88d1ddfbf4f0dcf3
|
|
4
|
+
data.tar.gz: 334f471d02f069a3f718bee913152c0cabc9ae0b8f63601fcf5a795b3f94c5e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 106fda17c11202615bbe465fc459b3ffb5201936ff6e6ea6a229e67530da7b06bd91c6230a425efb0f014b7b2c1e1d2a3495447b6e8f7069450a46d7ca882d76
|
|
7
|
+
data.tar.gz: 2d7a56d05a761bb768e61634ff3f707152e474a589a80a4687166fbbc35178424ce211df5cdfa2b03bddde2e4abc7708361fba549ed3f1772956a0367fa5e038
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
pub_sub_model_sync (1.6.
|
|
4
|
+
pub_sub_model_sync (1.6.1pre)
|
|
5
5
|
rails
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -99,8 +99,8 @@ GEM
|
|
|
99
99
|
googleapis-common-protos-types (>= 1.0.6, < 2.0)
|
|
100
100
|
googleauth (~> 0.15, >= 0.15.1)
|
|
101
101
|
grpc (~> 1.36)
|
|
102
|
-
globalid (
|
|
103
|
-
activesupport (>=
|
|
102
|
+
globalid (0.4.2)
|
|
103
|
+
activesupport (>= 4.2.0)
|
|
104
104
|
google-cloud-core (1.6.0)
|
|
105
105
|
google-cloud-env (~> 1.0)
|
|
106
106
|
google-cloud-errors (~> 1.0)
|
|
@@ -143,12 +143,12 @@ GEM
|
|
|
143
143
|
i18n (1.8.10)
|
|
144
144
|
concurrent-ruby (~> 1.0)
|
|
145
145
|
jwt (2.2.3)
|
|
146
|
-
loofah (2.
|
|
146
|
+
loofah (2.9.1)
|
|
147
147
|
crass (~> 1.0.2)
|
|
148
148
|
nokogiri (>= 1.5.9)
|
|
149
149
|
mail (2.7.1)
|
|
150
150
|
mini_mime (>= 0.1.1)
|
|
151
|
-
marcel (1.0.
|
|
151
|
+
marcel (1.0.1)
|
|
152
152
|
memoist (0.16.2)
|
|
153
153
|
method_source (1.0.0)
|
|
154
154
|
mini_mime (1.0.3)
|
|
@@ -156,7 +156,7 @@ GEM
|
|
|
156
156
|
multi_json (1.15.0)
|
|
157
157
|
multipart-post (2.1.1)
|
|
158
158
|
nio4r (2.5.8)
|
|
159
|
-
nokogiri (1.
|
|
159
|
+
nokogiri (1.13.4-x86_64-darwin)
|
|
160
160
|
racc (~> 1.4)
|
|
161
161
|
os (1.1.1)
|
|
162
162
|
parallel (1.20.1)
|
|
@@ -185,7 +185,7 @@ GEM
|
|
|
185
185
|
rails-dom-testing (2.0.3)
|
|
186
186
|
activesupport (>= 4.2.0)
|
|
187
187
|
nokogiri (>= 1.6)
|
|
188
|
-
rails-html-sanitizer (1.
|
|
188
|
+
rails-html-sanitizer (1.3.0)
|
|
189
189
|
loofah (~> 2.3)
|
|
190
190
|
railties (6.1.3.2)
|
|
191
191
|
actionpack (= 6.1.3.2)
|
|
@@ -230,19 +230,19 @@ GEM
|
|
|
230
230
|
faraday (>= 0.17.3, < 2.0)
|
|
231
231
|
jwt (>= 1.5, < 3.0)
|
|
232
232
|
multi_json (~> 1.10)
|
|
233
|
-
sprockets (4.0.
|
|
233
|
+
sprockets (4.0.2)
|
|
234
234
|
concurrent-ruby (~> 1.0)
|
|
235
235
|
rack (> 1, < 3)
|
|
236
|
-
sprockets-rails (3.
|
|
237
|
-
actionpack (>=
|
|
238
|
-
activesupport (>=
|
|
236
|
+
sprockets-rails (3.2.2)
|
|
237
|
+
actionpack (>= 4.0)
|
|
238
|
+
activesupport (>= 4.0)
|
|
239
239
|
sprockets (>= 3.0.0)
|
|
240
240
|
sqlite3 (1.4.2)
|
|
241
|
-
thor (1.
|
|
241
|
+
thor (1.1.0)
|
|
242
242
|
tzinfo (2.0.4)
|
|
243
243
|
concurrent-ruby (~> 1.0)
|
|
244
244
|
unicode-display_width (1.7.0)
|
|
245
|
-
websocket-driver (0.7.
|
|
245
|
+
websocket-driver (0.7.3)
|
|
246
246
|
websocket-extensions (>= 0.1.0)
|
|
247
247
|
websocket-extensions (0.1.5)
|
|
248
248
|
zeitwerk (2.4.2)
|
|
@@ -40,9 +40,7 @@ module PubSubModelSync
|
|
|
40
40
|
res = config.on_success_processing.call(payload, { subscriber: subscriber })
|
|
41
41
|
log "processed message with: #{payload.inspect}" if res != :skip_log
|
|
42
42
|
rescue => e
|
|
43
|
-
|
|
44
|
-
log("failed processing sync: #{{ klass: e.class.name, msg: e.message, retries: retries, rr: rr, payload: payload }.inspect}", :error)
|
|
45
|
-
rr ? retry : raise(e)
|
|
43
|
+
retry_process?(e, retries += 1) ? retry : raise(e)
|
|
46
44
|
end
|
|
47
45
|
|
|
48
46
|
def processable?(subscriber)
|
|
@@ -65,8 +63,11 @@ module PubSubModelSync
|
|
|
65
63
|
|
|
66
64
|
# @param error [StandardError]
|
|
67
65
|
def lost_db_connection?(error)
|
|
68
|
-
classes = %w[ActiveRecord::ConnectionTimeoutError PG::
|
|
69
|
-
classes.include?(error.class.name) ||
|
|
66
|
+
classes = %w[ActiveRecord::ConnectionTimeoutError PG::Error ActiveRecord::ConnectionNotEstablished]
|
|
67
|
+
classes.include?(error.class.name) ||
|
|
68
|
+
error.message.match?(/Lost connection to MySQL server/i) ||
|
|
69
|
+
error.message.start_with?('PG::ConnectionBad:') ||
|
|
70
|
+
error.message.start_with?('PG::UnableToSend:')
|
|
70
71
|
end
|
|
71
72
|
|
|
72
73
|
def retry_process?(error, retries) # rubocop:disable Metrics/MethodLength
|
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.6.
|
|
4
|
+
version: 1.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Owen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-10-
|
|
11
|
+
date: 2022-10-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -156,9 +156,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
156
156
|
version: '2.4'
|
|
157
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
requirements:
|
|
159
|
-
- - "
|
|
159
|
+
- - ">="
|
|
160
160
|
- !ruby/object:Gem::Version
|
|
161
|
-
version:
|
|
161
|
+
version: '0'
|
|
162
162
|
requirements: []
|
|
163
163
|
rubygems_version: 3.0.8
|
|
164
164
|
signing_key:
|