cf_light_api 3.0.0.pre6 → 3.0.0.pre7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cf_light_api/worker.rb +6 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fc46c1079a49968ee02e06f43c3d8169111129b
|
4
|
+
data.tar.gz: e84870573c9444a96ca09e8ab8b221c4db4efe5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0a2ecfa7d75d95d8c1b4a8de1a054cc84b8c193575d951f76cca46320874b8e76424bd84935f44eccf694a4c36e123ee2d1ae565a8e1aa86de9fc79bad3d87f
|
7
|
+
data.tar.gz: 0d672a8bc39ebae011a81c123eb30a446683eeacf4475a31a8cc74cf5e198f6063d9e0724ee11e3c4aef3028b08852ab53e6f68ae29cbe8cfc0a0aa28c57d278
|
data/lib/cf_light_api/worker.rb
CHANGED
@@ -355,18 +355,19 @@ class CFLightAPIWorker
|
|
355
355
|
v2_document['instances'] = instances
|
356
356
|
end
|
357
357
|
|
358
|
+
# We consider an app to be "running" if there is at least one app instance available with a state of "RUNNING"
|
358
359
|
running = false
|
360
|
+
running_instances = []
|
359
361
|
if v2_document['instances'].any?
|
360
|
-
|
361
|
-
|
362
|
-
end
|
362
|
+
running_instances = v2_document['instances'].select{|instance| instance['state'] == 'RUNNING'}
|
363
|
+
running = true if running_instances.any?
|
363
364
|
end
|
364
365
|
v1_document['running'] = running
|
365
366
|
v2_document['running'] = running
|
366
367
|
|
367
368
|
if @graphite
|
368
|
-
if
|
369
|
-
send_instance_usage_data_to_graphite(
|
369
|
+
if running_instances.any?
|
370
|
+
send_instance_usage_data_to_graphite(running_instances, v2_document['org'], v2_document['space'], v2_document['name'])
|
370
371
|
end
|
371
372
|
end
|
372
373
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cf_light_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.pre7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Springer Platform Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cfoundry
|