topological_inventory-providers-common 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aad209b97efea9bb19ce488782adb1dabfa8d650c12f8637e2b348ed4ec95a15
4
- data.tar.gz: 69b9bbed6a2d725990206ab3bfc7b13ec25b10f7e0c1a979b48c61b67e53fd0d
3
+ metadata.gz: faf7ab98d098c6dfed7cac60aa40dca8e84a26721eac35ed8a487c84c57d4375
4
+ data.tar.gz: 122a119549a916b7d908c7655a94ed855af4ddb49220e05cedd11e89972abcd3
5
5
  SHA512:
6
- metadata.gz: 45722b70f009a764d8cd804424157cc98b1a225b72326b8b8971fecd093fa6260446777db76bc3502e487d27dc82b2b4325959302f4a1abe13fbbf8c015c1d54
7
- data.tar.gz: b1a6de8e2eb93b2b26d4b609f17a1a518cf4b318dbcf117c6225fe297bb3ec97f870b944e151786977ad90f42c16746eeeadf6a3d113b648921e278cb831aadd
6
+ metadata.gz: 90d69186763762d8d62c41282f27b926b6aee15fbd2b916d2f911eab519f586650e97e804ea07e3c2c1121b953a305f949912648e05ffe016ef27cd4273b0747
7
+ data.tar.gz: f8864ca924b2e5b494d3e0fe2403bcd0f1c03450fe9ce755fb6bf80c832e8a1dafa0c788a9998ae50c2e63eb414852bdeadd593ca2ebfd8389ae1858e6517129
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [2.1.0]
7
+ ## [2.1.1] - 2020-11-04
8
+ MessagingClient and Source fix #61
9
+ Fix availability_check in app check #62
10
+
11
+ ## [2.1.0] - 2020-11-02
8
12
  Add Availability checks for sources via Kafka #54
9
13
  Common Metrics exporter #57
10
14
  Rubocop rules from insights-api-common + yamllint #59
@@ -12,7 +16,7 @@ Rubocop rules from insights-api-common + yamllint #59
12
16
  ## [2.0.0] - 2020-10-20
13
17
  Operations/API clients refactoring
14
18
 
15
- ## [1.0.12] - 2020-10-01
19
+ ## [1.0.12] - 2020-10-05
16
20
  Add Operations Async Worker class #55
17
21
 
18
22
  ## [1.0.11] - 2020-09-04
@@ -11,8 +11,8 @@ module TopologicalInventory
11
11
  attr_accessor :queue_port
12
12
 
13
13
  def initialize
14
- @queue_host = ENV['QUEUE_HOST'] || 'localhost'
15
- @queue_port = (ENV['QUEUE_PORT'] || 9092).to_i
14
+ self.queue_host = ENV['QUEUE_HOST'] || 'localhost'
15
+ self.queue_port = (ENV['QUEUE_PORT'] || 9092).to_i
16
16
  end
17
17
 
18
18
  def self.default
@@ -28,7 +28,7 @@ module TopologicalInventory
28
28
  end
29
29
 
30
30
  cache_with_timeout(:client) do
31
- ManageIQ::Messaging::Client.open(:protocol => :Kafka, :host => @queue_host, :port => @queue_port)
31
+ ManageIQ::Messaging::Client.open(:protocol => :Kafka, :host => default.queue_host, :port => default.queue_port)
32
32
  end
33
33
 
34
34
  def client
@@ -83,7 +83,7 @@ module TopologicalInventory
83
83
  application.last_checked_at.present? && application.last_checked_at >= LAST_CHECKED_AT_THRESHOLD.ago
84
84
  end
85
85
 
86
- logger.availability_check("Skipping, last check at #{endpoint.last_checked_at || application.last_checked_at} [Source ID: #{source_id}] ") if checked_recently
86
+ logger.availability_check("Skipping, last check at #{endpoint&.last_checked_at || application&.last_checked_at} [Source ID: #{source_id}] ") if checked_recently
87
87
 
88
88
  checked_recently
89
89
  end
@@ -214,7 +214,7 @@ module TopologicalInventory
214
214
  :payload => payload.to_json
215
215
  )
216
216
  rescue => err
217
- logger.availability_check("Failed to update Application id: #{application.id} - #{err.message}", :error)
217
+ logger.availability_check("Failed to update #{payload[:resource_type]} id: #{payload[:resource_id]} - #{err.message}", :error)
218
218
  ensure
219
219
  messaging_client&.close
220
220
  end
@@ -1,7 +1,7 @@
1
1
  module TopologicalInventory
2
2
  module Providers
3
3
  module Common
4
- VERSION = "2.1.0".freeze
4
+ VERSION = "2.1.1".freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: topological_inventory-providers-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Slemr
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-02 00:00:00.000000000 Z
11
+ date: 2020-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport