manageiq-appliance_console 7.1.0 → 7.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a87349bf14d9211aa40088c39668407f50545de717a9da552e74430a44750e5
|
4
|
+
data.tar.gz: 4f3a63c811e3e0e4db435fa96a476c8d5988cd4b70eab125abe5fa0a9812c976
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e620e0826634427b14394181875562130e9997d7969fd8a6886124b2b1ba5d61f936a293b37c886b771e3f4f1d5529150dfe2a65ed12a3dd753bfe7f2c2ee3ad
|
7
|
+
data.tar.gz: b17e8214b2a508c01107281d1177517af80c839fbb1cc64ec5cff696383029b11e54319eac18078a324ec2e04bec7e9bd90d3a9f9d6855ef1979fbd2d63ed480
|
@@ -27,8 +27,13 @@ module ApplianceConsole
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def self.db_connections
|
30
|
+
# TODO: this is impossible to test right now because we need to shell out and run our rails app which isn't a direct dependency here.
|
31
|
+
# We have the settings from the database_configuration, so we should pass them here and simplify this and make it testable.
|
32
|
+
# Basically, we're doing a lot of work to run this 1 query:
|
33
|
+
# psql -U username -h host postgres -c "select count(*) from pg_stat_activity where datname = 'vmdb_production';"
|
34
|
+
# We shouldn't need to subtract our 1 "connection" in "bail_if_db_connections" if we connect to the postgres db.
|
30
35
|
code = [
|
31
|
-
"database ||= ActiveRecord::Base.configurations
|
36
|
+
"database ||= ActiveRecord::Base.configurations.configs_for(:env_name => Rails.env).first.database",
|
32
37
|
"conn = ActiveRecord::Base.connection",
|
33
38
|
"exit conn.client_connections.count { |c| c['database'] == database }"
|
34
39
|
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manageiq-appliance_console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.1.
|
4
|
+
version: 7.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|