app/controllers/application_controller.rb
# Forces a reconnect to the UWSDB by calling #reconnect! on the StudentInfo.connection object. If we aren't able
# to connect, for any reason, then we render the uwsdb_error exception page along with a 503 status.
Forces a reconnect to the UWSDB by calling #reconnect.
Forces a reconnect to the UWSDB by calling #reconnect .
def verify_uwsdb_connection
    ret = ""
    cmd = "::StudentInfo.connection.reconnect!"
    time = Benchmark::realtime { ret = eval(cmd) }
    logger.info { "  \e[4;33;1mVerify UWSDB Connection (#{time.to_s[0..8]})\e[0m   #{cmd}" }
  rescue => e
    render :template => "exceptions/uwsdb_error", :layout => false, :status => 503
    logger.info { "  \e[4;33;1mVerify UWSDB Connection (#{time.to_s[0..8]})\e[0m   #{e}" }
  end
def verify_uwsdb_connection ret = "" cmd = "::StudentInfo.connection.reconnect!" time = Benchmark :: realtime { ret = eval ( cmd ) } logger . info { "  \e[4;33;1mVerify UWSDB Connection (#{time.to_s[0..8]})\e[0m   #{cmd}" } rescue => e render :template => "exceptions/uwsdb_error" , :layout => false , :status => 503 logger . info { "  \e[4;33;1mVerify UWSDB Connection (#{time.to_s[0..8]})\e[0m   #{e}" } end
Forces a reconnect to the UWSDB by calling #reconnect!
Forces a reconnect to the UWSDB by calling #reconnect!