forest_admin_datasource_rpc 1.18.2 → 2.0.0
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/lib/forest_admin_datasource_rpc/version.rb +1 -1
- data/lib/forest_admin_datasource_rpc.rb +0 -15
- 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: f0b6bdcda842a6d936560f74f955186c51f36d4be1dbd332c51d0ecdea710cf5
|
|
4
|
+
data.tar.gz: faabc27ad8e0b3b9fe5f719da93375224c8e4f42bec99dff71c9a132c58119fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9fe4da7443c4080e0097ad823e750a4cc5fab2e992a1890cc22568ed055cc0b7f78702ca4523bcc0ecb56715355d02c89915d4bffbfd80e9e861ee128633cbe2
|
|
7
|
+
data.tar.gz: ff37fcf51cf77f521b284dc4f21358241a1c5cd5859117cf614b507a1f4cb0836f547cf0220222052b0cc05a5f898debeb1ab3bf01aa182767fca3a3ff769543
|
|
@@ -19,16 +19,11 @@ module ForestAdminDatasourceRpc
|
|
|
19
19
|
# - Valid range: 1-3600 seconds
|
|
20
20
|
# - Priority: options[:schema_polling_interval] > ENV['SCHEMA_POLLING_INTERVAL'] > default
|
|
21
21
|
# - Example: SCHEMA_POLLING_INTERVAL=30 for development (30 seconds)
|
|
22
|
-
# @option options [Hash] :introspection Pre-defined schema introspection for resilient deployment
|
|
23
|
-
# - When provided, allows the datasource to start even if the RPC slave is unreachable
|
|
24
|
-
# - The introspection will be used as fallback when the slave connection fails
|
|
25
|
-
# - Schema polling will still be enabled to pick up changes when the slave becomes available
|
|
26
22
|
#
|
|
27
23
|
# @return [ForestAdminDatasourceRpc::Datasource] The configured datasource with schema polling
|
|
28
24
|
def self.build(options)
|
|
29
25
|
uri = options[:uri]
|
|
30
26
|
auth_secret = options[:auth_secret] || ForestAdminAgent::Facades::Container.cache(:auth_secret)
|
|
31
|
-
provided_introspection = options[:introspection]
|
|
32
27
|
ForestAdminAgent::Facades::Container.logger.log('Info', "Getting schema from RPC agent on #{uri}.")
|
|
33
28
|
|
|
34
29
|
schema = nil
|
|
@@ -59,16 +54,6 @@ module ForestAdminDatasourceRpc
|
|
|
59
54
|
)
|
|
60
55
|
end
|
|
61
56
|
|
|
62
|
-
# Use provided introspection as fallback when slave is unreachable
|
|
63
|
-
if schema.nil? && provided_introspection
|
|
64
|
-
ForestAdminAgent::Facades::Container.logger.log(
|
|
65
|
-
'Warn',
|
|
66
|
-
"RPC agent at #{uri} is unreachable, using provided introspection for resilient deployment."
|
|
67
|
-
)
|
|
68
|
-
options.delete(:introspection)
|
|
69
|
-
schema = provided_introspection
|
|
70
|
-
end
|
|
71
|
-
|
|
72
57
|
if schema.nil?
|
|
73
58
|
# return empty datasource for not breaking stack
|
|
74
59
|
ForestAdminDatasourceToolkit::Datasource.new
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: forest_admin_datasource_rpc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthieu
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2025-12-
|
|
12
|
+
date: 2025-12-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: base64
|