receptor_controller-client 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f41b7d6f4bd570860329519b76db11ce76e7fd1938d05195d32700a88b373b4d
4
- data.tar.gz: 3720db1535834c0ad565aed6f1d9d6b99a78395b46cfd11be65ab29dc2ce5942
3
+ metadata.gz: ab72f29ace5c188996000048957bb58020940d3b8ce32b1a0b720602f4ff7e64
4
+ data.tar.gz: 4b68d648d59809f80e108a1d998af10d09fee233db085e02b736c691db05b8d5
5
5
  SHA512:
6
- metadata.gz: e08b4c2d9590b7ec470a5703432d6504ed928fefc219adee040df5db9d9c5fa69d31e0f5f1ab6a8476ec981c694b111999ab27be484fe005228c3e9b7e25e401
7
- data.tar.gz: 4ac74ec793767207779c7cb6d952712d4335c87ee249638cf714ce3a30775e3b18a96b114ead27585fe026da52077a78b6c5bb9997176d3f06f092d7f37912af
6
+ metadata.gz: 32b8c1c4a2173e38ec229bad3b4f0c6747c9f9cc50ce3be86746217a6682b60e4c820e9677adc38798548d81bb62db858994a7019cb85fc9b58c149eb0357c2e
7
+ data.tar.gz: abfdf8a4c9924f4ba225310f5439b97f003d4ac01eedd14a822328d7750289a60cc9ec49a086ac125f446adbd0c84840afc02562a84c3c02c19f6402b201a469
@@ -5,6 +5,9 @@ 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
7
  ## [Unreleased]
8
+ ## [0.0.7]
9
+ - rdkafka changes #32
10
+
8
11
  ## [0.0.6]
9
12
  - Waiting for response-worker kafka init #20
10
13
  - Fix href_slug in directives log #29
@@ -27,7 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
27
30
  ### Added
28
31
  - Added extra logging for messages
29
32
 
30
- [Unreleased]: https://github.com/RedHatInsights/receptor_controller-client-ruby/compare/v0.0.6...HEAD
33
+ [Unreleased]: https://github.com/RedHatInsights/receptor_controller-client-ruby/compare/v0.0.7...HEAD
34
+ [0.0.6]: https://github.com/RedHatInsights/receptor_controller-client-ruby/releases/tag/v0.0.7
31
35
  [0.0.6]: https://github.com/RedHatInsights/receptor_controller-client-ruby/releases/tag/v0.0.6
32
36
  [0.0.5]: https://github.com/RedHatInsights/receptor_controller-client-ruby/releases/tag/v0.0.5
33
37
  [0.0.4]: https://github.com/RedHatInsights/receptor_controller-client-ruby/releases/tag/v0.0.4
@@ -47,16 +47,12 @@ module ReceptorController
47
47
  return if started.value
48
48
 
49
49
  default_messaging_opts # Thread-safe init
50
- init_notifications(init_lock, init_wait)
51
50
 
52
51
  started.value = true
53
52
  workers[:maintenance] = Thread.new { check_timeouts while started.value }
54
53
  workers[:listener] = Thread.new { listen while started.value }
55
54
  end
56
55
 
57
- # Wait for kafka initialization
58
- wait_for_notifications(init_lock, init_wait)
59
-
60
56
  logger.info("Receptor Response worker started...")
61
57
  end
62
58
 
@@ -71,36 +67,6 @@ module ReceptorController
71
67
  end
72
68
  end
73
69
 
74
- # Listening for the consumer call to the Fetch API
75
- # Then releasing original starting thread
76
- def init_notifications(init_lock, init_wait)
77
- logger.info("Initializing Receptor kafka client...")
78
- start_time = Time.now.utc
79
- ActiveSupport::Notifications.subscribe('request.connection.kafka') do |*args|
80
- event = ActiveSupport::Notifications::Event.new(*args)
81
- if default_messaging_opts[:client_ref] == event.payload[:client_id]
82
- if event.payload[:api] == :fetch
83
- logger.info "Receptor Kafka client successfully initialized "
84
- # initialized, unsubscribe notifications
85
- ActiveSupport::Notifications.unsubscribe('request.connection.kafka')
86
- init_lock.synchronize { init_wait.signal }
87
- end
88
- end
89
-
90
- if start_time <= INITIALIZATION_TIMEOUT.seconds.ago.utc
91
- ActiveSupport::Notifications.unsubscribe('request.connection.kafka')
92
- logger.error("Receptor Kafka client initialization timeout...")
93
- init_lock.synchronize { init_wait.signal }
94
- end
95
- end
96
- end
97
-
98
- def wait_for_notifications(init_lock, init_wait)
99
- init_lock.synchronize do
100
- init_wait.wait(init_lock)
101
- end
102
- end
103
-
104
70
  # Registers message_id received by request,
105
71
  # Defines response and timeout callback methods
106
72
  #
@@ -1,5 +1,5 @@
1
1
  module ReceptorController
2
2
  class Client
3
- VERSION = "0.0.6".freeze
3
+ VERSION = "0.0.7".freeze
4
4
  end
5
5
  end
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.add_runtime_dependency 'faraday', '~> 1.0'
25
25
  s.add_runtime_dependency 'json', '~> 2.3', '>= 2.3.0'
26
26
  s.add_runtime_dependency 'manageiq-loggers', '~> 0.5.0'
27
- s.add_runtime_dependency 'manageiq-messaging', '~> 0.1.5'
27
+ s.add_runtime_dependency 'manageiq-messaging', '~> 1.0.0'
28
28
 
29
29
  s.add_development_dependency 'bundler', '~> 2.0'
30
30
  s.add_development_dependency 'rake', '>= 12.3.3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: receptor_controller-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Slemr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-18 00:00:00.000000000 Z
11
+ date: 2020-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -98,14 +98,14 @@ dependencies:
98
98
  requirements:
99
99
  - - "~>"
100
100
  - !ruby/object:Gem::Version
101
- version: 0.1.5
101
+ version: 1.0.0
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
- version: 0.1.5
108
+ version: 1.0.0
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: bundler
111
111
  requirement: !ruby/object:Gem::Requirement
@@ -261,8 +261,8 @@ signing_key:
261
261
  specification_version: 4
262
262
  summary: Client for communication with Platform Receptor Controller - Gem
263
263
  test_files:
264
- - spec/receptor_controller/client_spec.rb
265
- - spec/receptor_controller/response_worker_spec.rb
266
264
  - spec/receptor_controller/directive_non_blocking_spec.rb
265
+ - spec/receptor_controller/response_worker_spec.rb
267
266
  - spec/receptor_controller/directive_blocking_spec.rb
267
+ - spec/receptor_controller/client_spec.rb
268
268
  - spec/spec_helper.rb