Guest User

Untitled

a guest
Jul 12th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. def display_menu_server_info
  2. @cluster = get_cluster
  3. @hostname = get_hostname
  4. puts "Production/Mirror: " + get_prod_or_mir(@cluster)
  5. puts "Server Name: " + @hostname#Hostname
  6. puts "Member of: " + @cluster#Cluster name
  7. puts "Scripts Currently Running: "
  8. end
  9.  
  10. def connect
  11. @con = ActiveRecord::Base.establish_connection(:adapter => "mysql",
  12. :host => "bleh",
  13. :database => "podstatus",
  14. :username => "root",
  15. :password => "bleh" )
  16. end
  17.  
  18. def get_prod_or_mir(cluster)
  19. @con = connect
  20. @servers = PodStatus.find_by_sql("select * from vw_max_added_with_current_statuses where pod=\"#{@cluster}\";")
  21. return "N/A Yet"
  22. end
Add Comment
Please, Sign In to add comment