Skip to content

Instantly share code, notes, and snippets.

@mfojtik
Created February 24, 2014 20:47
Show Gist options
  • Save mfojtik/9196684 to your computer and use it in GitHub Desktop.
Save mfojtik/9196684 to your computer and use it in GitHub Desktop.
def update_ld_library_paths
db_carts = [ 'postgresql-9.2', 'mysql-5.5' ]
Application.where({"scalable" => true}).each do |app|
if app.component_instances.any? { |c| db_carts.include?(c.component_name) }
begin
app.execute_connections
rescue => e
puts "Failed to execute_connections for #{app._id} (ERR: #{e.message})"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment