forest_admin_agent 1.8.9 → 1.9.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db02d65763186ba3ebdb9a253ca60c7a292c00f4b52d54e841be1ab4cd05702b
|
4
|
+
data.tar.gz: 87bd836d1d1f461d7aed416d8bb43397067f1575331974df1ac59ec32bbb415d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 241d1f8f861ed041334c14713018b0c0609d4193e4821c1d517975b1e780b57fc5e606fae505799f73393b700117e17cc53b8218b1a6595d71d238fc9d887cda
|
7
|
+
data.tar.gz: 434548e00921d627fa800d10834980476afaf3bd3a3ef5e2e80bca7bd64263622284bae86c28449b3708ac507847ff8326c6029163164930564da7fd601eb385
|
@@ -62,6 +62,11 @@ module ForestAdminAgent
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def send_schema(force: false)
|
65
|
+
if should_skip_schema_update? && !force
|
66
|
+
log_schema_skip
|
67
|
+
return
|
68
|
+
end
|
69
|
+
|
65
70
|
return unless @has_env_secret
|
66
71
|
|
67
72
|
schema_path = Facades::Container.cache(:schema_path)
|
@@ -160,6 +165,17 @@ module ForestAdminAgent
|
|
160
165
|
cleaned_option = source&.strip if source
|
161
166
|
cleaned_option&.delete_prefix(prefix)&.strip
|
162
167
|
end
|
168
|
+
|
169
|
+
def should_skip_schema_update?
|
170
|
+
Facades::Container.cache(:skip_schema_update) == true
|
171
|
+
end
|
172
|
+
|
173
|
+
def log_schema_skip
|
174
|
+
@logger.log('Warn', '[ForestAdmin] Schema update skipped (skip_schema_update flag is true)')
|
175
|
+
environment = Facades::Container.cache(:is_production) ? 'production' : 'development'
|
176
|
+
@logger.log('Info',
|
177
|
+
"[ForestAdmin] Running in #{environment} mode")
|
178
|
+
end
|
163
179
|
end
|
164
180
|
end
|
165
181
|
end
|
@@ -10,10 +10,6 @@ module ForestAdminAgent
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def handle_request(_args = {})
|
13
|
-
if AgentFactory.instance.container.resolve(:cache).get('config')[:is_production]
|
14
|
-
AgentFactory.instance.send_schema(force: true)
|
15
|
-
end
|
16
|
-
|
17
13
|
{ content: nil, status: 204 }
|
18
14
|
end
|
19
15
|
end
|