connectors_service 8.6.0.1 → 8.6.0.3
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 +4 -4
- data/config/connectors.yml +2 -2
- data/lib/connectors/mongodb/connector.rb +2 -2
- data/lib/core/scheduler.rb +8 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b550a78dba7e4cd4502b6eea4c187253e6bb77ab944815b59809d92c7ccc23bb
|
4
|
+
data.tar.gz: dbe8c32e1da94ed40777af57a84ecac883a15cab71aa164534157314bbcbfcff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92ef83e3bc94107b1cb11b4454760b17c217b61beb555b55d01ddb7b0758372c3f04ed1acc153e406f20c7abb2df5a3540c2b93733b48eafcc99bd752e7d6759
|
7
|
+
data.tar.gz: a7eade1996d683fcf47e072704d566479538249d9711e8c0d2019fbb7bd15c382c61cd35adc6ee52f989a75c1fa6d7a6fe1330a04801fb46952aa307f2e93ac5
|
data/config/connectors.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# general metadata
|
2
|
-
version: 8.6.0.
|
2
|
+
version: 8.6.0.3
|
3
3
|
repository: https://github.com/elastic/connectors-ruby.git
|
4
|
-
revision:
|
4
|
+
revision: aa2faf8cc993a26980441adffe97d62fdaf5aa5c
|
5
5
|
elasticsearch:
|
6
6
|
cloud_id: CHANGEME
|
7
7
|
hosts: http://localhost:9200
|
@@ -120,11 +120,11 @@ module Connectors
|
|
120
120
|
mongodb_document.map { |v| serialize(v) }
|
121
121
|
when Hash
|
122
122
|
mongodb_document.map do |key, value|
|
123
|
-
remapped_key = key ==
|
123
|
+
remapped_key = key.to_sym == :_id ? :id : key.to_sym
|
124
124
|
|
125
125
|
remapped_value = serialize(value)
|
126
126
|
[remapped_key, remapped_value]
|
127
|
-
end.to_h
|
127
|
+
end.to_h.with_indifferent_access
|
128
128
|
else
|
129
129
|
mongodb_document
|
130
130
|
end
|
data/lib/core/scheduler.rb
CHANGED
@@ -45,7 +45,7 @@ module Core
|
|
45
45
|
Utility::ExceptionTracking.log_exception(e, 'Sync failed due to unexpected error.')
|
46
46
|
ensure
|
47
47
|
if @poll_interval > 0 && !@is_shutting_down
|
48
|
-
Utility::Logger.
|
48
|
+
Utility::Logger.debug("Sleeping for #{@poll_interval} seconds in #{self.class}.")
|
49
49
|
sleep(@poll_interval)
|
50
50
|
end
|
51
51
|
end
|
@@ -62,7 +62,7 @@ module Core
|
|
62
62
|
return false unless connector_registered?(connector_settings.service_type)
|
63
63
|
|
64
64
|
unless connector_settings.valid_index_name?
|
65
|
-
Utility::Logger.
|
65
|
+
Utility::Logger.warn("The index name of #{connector_settings.formatted} is invalid.")
|
66
66
|
return false
|
67
67
|
end
|
68
68
|
|
@@ -81,7 +81,7 @@ module Core
|
|
81
81
|
# Don't sync if sync is explicitly disabled
|
82
82
|
scheduling_settings = connector_settings.scheduling_settings
|
83
83
|
unless scheduling_settings.present? && scheduling_settings[:enabled] == true
|
84
|
-
Utility::Logger.
|
84
|
+
Utility::Logger.debug("#{connector_settings.formatted.capitalize} scheduling is disabled.")
|
85
85
|
return false
|
86
86
|
end
|
87
87
|
|
@@ -141,16 +141,18 @@ module Core
|
|
141
141
|
end
|
142
142
|
|
143
143
|
def configuration_triggered?(connector_settings)
|
144
|
-
|
144
|
+
if connector_settings.needs_service_type? || connector_registered?(connector_settings.service_type)
|
145
|
+
return connector_settings.connector_status == Connectors::ConnectorStatus::CREATED
|
146
|
+
end
|
145
147
|
|
146
|
-
|
148
|
+
false
|
147
149
|
end
|
148
150
|
|
149
151
|
def connector_registered?(service_type)
|
150
152
|
if Connectors::REGISTRY.registered?(service_type)
|
151
153
|
true
|
152
154
|
else
|
153
|
-
Utility::Logger.
|
155
|
+
Utility::Logger.warn("The service type (#{service_type}) is not supported.")
|
154
156
|
false
|
155
157
|
end
|
156
158
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connectors_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.6.0.
|
4
|
+
version: 8.6.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|