Advertisement
Guest User

Untitled

a guest
Apr 15th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. production:
  2. ..
  3.  
  4. observium:
  5. adapter: mysql2
  6. database: observium
  7. username: username
  8. password: password
  9. host: observium.domain.com
  10. port: 3306
  11. wait_timeout: 86400
  12.  
  13.  
  14. development:
  15. ..
  16.  
  17. class ObserviumPort < ActiveRecord::Base
  18.  
  19. establish_connection :observium
  20.  
  21. self.table_name = 'ports'
  22.  
  23. def self.get_port(circuit)
  24. result = ObserviumPort.find(
  25. :first,
  26. :conditions => ['port_descr_circuit = ?', circuit.id],
  27. :order => 'ifName ASC',
  28. :limit => 1
  29. )
  30.  
  31. return result.port_id
  32. end
  33.  
  34. Mysql2::Error (Can't connect to MySQL server on 'observium.domain.com' (4)):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement