Method: DdeClient::DdeService#test_connection
- Defined in:
- app/services/dde_client/dde_service.rb
#test_connection ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'app/services/dde_client/dde_service.rb', line 35 def test_connection response = { connection_available: false, message: 'No connection to Dde', status: 500 } begin result, status = dde_client response[:connection_available] = status == 200 response[:message] = result rescue StandardError => exception LOGGER.error "Failed to connect to Dde: #{exception.message}" response[:message] = exception. end response end |