Skip to content

Commit

Permalink
Fix ActiveRecord check
Browse files Browse the repository at this point in the history
In Rails 7.1 the database connection is no longer triggered by #new_connection, this implies that
at boot time the connection is not yet active. To fix it first trigger a connection ourselves.

See rails/rails@2da1852
  • Loading branch information
intrip committed Nov 17, 2023
1 parent 9c3a631 commit 090ccdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/easymon/checks/active_record_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def check

private
def database_up?
klass.connection.connect!
klass.connection.active?
rescue
false
Expand Down

0 comments on commit 090ccdb

Please sign in to comment.