mumuki-domain 9.5.0 → 9.6.0
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/app/models/application_record.rb +15 -0
- data/lib/mumuki/domain/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: 6bf110cfb0548ff83999aba2c18fa8e2647237c764f5475bb7f0543b74d2e573
|
|
4
|
+
data.tar.gz: 06fbf9c04aa1d09579315504ad1f9594581b067f925e88d804632a63d6f36e3d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e398b8225bbc019cf01b72900476a306c32ac4d2f6a4a8522e543c89bf2f641ff9d234efd866b417c59cee8051f2983039379fa32f2f8d45dd1d3152ebabb176
|
|
7
|
+
data.tar.gz: af14215013b827db24006cdff794a5ac0b4aac7229b503abb935d741bf4e10ab6a667a53bb76a36672a88236f1708dd0b4c0d4beb007cdb9b308213d65fb20d4
|
|
@@ -103,6 +103,21 @@ class ApplicationRecord < ActiveRecord::Base
|
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
+
def self.with_pg_retry(&block)
|
|
107
|
+
retries ||= 0
|
|
108
|
+
transaction(&block)
|
|
109
|
+
rescue ActiveRecord::StatementInvalid => e
|
|
110
|
+
retries += 1
|
|
111
|
+
|
|
112
|
+
raise e if retries > 2
|
|
113
|
+
if %w(PG::ConnectionBad PG::UnableToSend).any? { |it| e.message.include? it }
|
|
114
|
+
warn "Postgres connection failed. Retrying in 5 seconds..."
|
|
115
|
+
sleep 5
|
|
116
|
+
ActiveRecord::Base.connection.verify!
|
|
117
|
+
retry
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
106
121
|
def self.numbered(*associations)
|
|
107
122
|
class_eval do
|
|
108
123
|
associations.each do |it|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mumuki-domain
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 9.
|
|
4
|
+
version: 9.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Franco Leonardo Bulgarelli
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-06-
|
|
11
|
+
date: 2021-06-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|