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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cf_light_api/worker.rb +4 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67e83e63e7e82401f140877f22ae9b067eb3aa6c
4
- data.tar.gz: 0db83bdbdb75b7945751553101c8fb8fc3e61cc2
3
+ metadata.gz: b5afa1da4d96084a76354c0bcd8544b2c2412896
4
+ data.tar.gz: e9bb6e37de0d1af87e8ab9555a292e282869b473
5
5
  SHA512:
6
- metadata.gz: 3eb96485acac92733e80b92d8cdc787ae9e6e77e7b9d1e976e8db4db1b94e5cce8b40c596ef15c4a110591eebce44689702805ec681ef0a608bcf1311ba37aab
7
- data.tar.gz: 8c89cabe199701849ed56c045747892eb577090a0bbf62b607f12b0fedce9f167d64c98fc06f0ab9d996c2f29db9afadc01fa5912e9c65057337ed498a13af4b
6
+ metadata.gz: 50106d0b2aaba20a1e07d17ce2eb415954904b52479a2097583315b75451faff00706aea6c84b4b7927028a0cade97035ac8db6aa66faf6cb48931bed2190418
7
+ data.tar.gz: 5eace511a6f414778cdddc4db00c7ed1579c690558756dd49a77abc2d476ca92ec1d74ef566e2517fd28c30ab7ba113dcee73b8a68959ea23e79bb78b40fdb40
@@ -5,7 +5,7 @@ require 'parallel'
5
5
  require 'redlock'
6
6
  require 'logger'
7
7
  require 'graphite-api'
8
- require 'time'
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 = DateTime.parse app.manifest[:entity][:package_updated_at]
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 => [],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf_light_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.6
4
+ version: 1.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Springer Platform Engineering