Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cc: minimal droplet_id.to_s change

Change-Id: I89a66132c15d48bd1fd4cc30055f74215809d342
  • Loading branch information...
commit 18703ef05d05f1c824682634a17cf6a6948e3170 1 parent ab67f0d
@bnugmanov bnugmanov authored
View
4 cloud_controller/app/models/app.rb
@@ -72,7 +72,7 @@ def self.health_manager_representations
users.each {|u| emails_by_id[u.id.to_s] = u.email}
apps = connection.select_all("select id, name, state, instances, owner_id from apps")
apps.each do |row|
- h = {:droplet_id => row['id'].to_i, :state => row['state'], :name => row['name']}
+ h = {:droplet_id => row['id'].to_s, :state => row['state'], :name => row['name']}
h[:user] = emails_by_id[row['owner_id']]
h[:instances] = row['instances'].to_i
results << h
@@ -142,7 +142,7 @@ def running_instances
return 0 unless started?
# If started, poll for correct running_instances through the HM
h = ::App.health([{ :droplet => self.id, :version => generate_version }])
- h ? h[self.id] : 0
+ h ? h[self.id.to_s] : 0
end
def resource_requirements
View
2  cloud_controller/app/models/user.rb
@@ -95,7 +95,7 @@ def get_apps
health = ::App.health(health_request)
entries.collect do |app|
hash = app.as_json
- hash[:runningInstances] = health[app.id]
+ hash[:runningInstances] = health[app.id.to_s]
hash
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.