• Rémy Coutable's avatar
    Ensure rake tasks that don't need a DB connection can be run without one · e6f3fe5d
    Rémy Coutable authored
    When using ActiveRecord::Base.connection.active? without a DB
    connection, we get a "PG::ConnectionBad: could not connect to server"
    error because ActiveRecord::Base.connection doesn't exist. By using
    ActiveRecord::Base.connected? we ensure we don't get this error if
    the connection is missing, which is the all point of the
    Gitlab::CurrentSettings#connect_to_db? method!
    e6f3fe5d
To find the state of this project's repository at the time of any of these versions, check out the tags.
CHANGELOG 106 KB