cf_light_api 1.6.6 → 1.6.7
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 +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5afa1da4d96084a76354c0bcd8544b2c2412896
|
4
|
+
data.tar.gz: e9bb6e37de0d1af87e8ab9555a292e282869b473
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50106d0b2aaba20a1e07d17ce2eb415954904b52479a2097583315b75451faff00706aea6c84b4b7927028a0cade97035ac8db6aa66faf6cb48931bed2190418
|
7
|
+
data.tar.gz: 5eace511a6f414778cdddc4db00c7ed1579c690558756dd49a77abc2d476ca92ec1d74ef566e2517fd28c30ab7ba113dcee73b8a68959ea23e79bb78b40fdb40
|
data/lib/cf_light_api/worker.rb
CHANGED
@@ -5,7 +5,7 @@ require 'parallel'
|
|
5
5
|
require 'redlock'
|
6
6
|
require 'logger'
|
7
7
|
require 'graphite-api'
|
8
|
-
require '
|
8
|
+
require 'date'
|
9
9
|
|
10
10
|
@logger = Logger.new(STDOUT)
|
11
11
|
@logger.formatter = proc do |severity, datetime, progname, msg|
|
@@ -129,7 +129,7 @@ end
|
|
129
129
|
|
130
130
|
def format_app_data(app, org_name, space_name)
|
131
131
|
|
132
|
-
last_uploaded =
|
132
|
+
last_uploaded = (app.manifest[:entity][:package_updated_at] ||= nil)
|
133
133
|
|
134
134
|
base_data = {
|
135
135
|
:guid => app.guid,
|
@@ -140,7 +140,7 @@ def format_app_data(app, org_name, space_name)
|
|
140
140
|
:buildpack => app.buildpack,
|
141
141
|
:routes => app.routes.map {|route| route.name},
|
142
142
|
:data_from => Time.now.to_i,
|
143
|
-
:last_uploaded => last_uploaded.strftime('%Y-%m-%d %T %z')
|
143
|
+
:last_uploaded => last_uploaded ? DateTime.parse(last_uploaded).strftime('%Y-%m-%d %T %z') : nil
|
144
144
|
}
|
145
145
|
|
146
146
|
additional_data = {}
|
@@ -151,7 +151,7 @@ def format_app_data(app, org_name, space_name)
|
|
151
151
|
:error => nil
|
152
152
|
}
|
153
153
|
rescue => e
|
154
|
-
@logger.info " #{org_name} #{space_name}: '#{app.name}'' error: #{e.message}"
|
154
|
+
# @logger.info " #{org_name} #{space_name}: '#{app.name}'' error: #{e.message}"
|
155
155
|
additional_data = {
|
156
156
|
:running => 'error',
|
157
157
|
:instances => [],
|