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: 13d06e58180ded69cdf13cb7651c0179c75682f3eb4d8b140217a26d3a5a83ca
4
- data.tar.gz: 44c9e714f68ff5628b117362ddcd61f84a5102a56a123d0257f7c3fb79b750d9
3
+ metadata.gz: 5a87349bf14d9211aa40088c39668407f50545de717a9da552e74430a44750e5
4
+ data.tar.gz: 4f3a63c811e3e0e4db435fa96a476c8d5988cd4b70eab125abe5fa0a9812c976
5
5
  SHA512:
6
- metadata.gz: e82ac876ae854f370e79adc5a7684257bb179426e785691eb1e44bc4dc7972c666cdb8bf1479cc7e92d0f3bca32f8a674c856fc112fe3d7d99ea28f2ae2c7504
7
- data.tar.gz: 18de59fabdae4811c610e1153f51113e3c2be1ded325504df6593c2c274aff34d0c7121eac3ebf1cf0e8ffb8d3452164f7271719ddc8770ccd973d236d11acd1
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[Rails.env]['database']",
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
  ]
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module ApplianceConsole
3
- VERSION = '7.1.0'.freeze
3
+ VERSION = '7.1.1'.freeze
4
4
  end
5
5
  end
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.0
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-08-12 00:00:00.000000000 Z
11
+ date: 2022-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord