Permalink
Browse files

untrack

  • Loading branch information...
1 parent 51832c3 commit 187f3c564332ef21bbfc57a359bb06825c601da6 @will will committed Apr 27, 2011
Showing with 6 additions and 10 deletions.
  1. +2 −2 client.rb
  2. +4 −8 pg.rb
View
4 client.rb
@@ -32,8 +32,8 @@ def get_database
http_get @database_sha
end
- def promote(leader_url)
- http_put "#{@database_sha}/promote"
+ def untrack
+ http_put "#{@database_sha}/untrack"
end
protected
View
12 pg.rb
@@ -42,7 +42,10 @@ def untrack
display "Untracking the leader #{follower_db[:name]}"
return unless confirm_command
- untrack(follower_db)
+ return if follower_db[:name].include? "SHARED_DATABASE"
+ working_display "Untracking" do
+ heroku_postgresql_client(follower_db[:url]).untrack
+ end
display_info "#{follower_db[:name]} stopped tracking", follower_db[:url]
end
@@ -64,13 +67,6 @@ def reset
private
- def untrack(follower_db)
- return if follower_db[:name].include? "SHARED_DATABASE"
- working_display "Promoting" do
- heroku_postgresql_client(follower_db[:url]).promote
- end
- end
-
def set_database_url(url)
working_display "Updating DATABASE_URL" do
heroku.add_config_vars(app, {"DATABASE_URL" => url})

0 comments on commit 187f3c5

Please sign in to comment.