Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33309261
D12846.1768804207.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12846.1768804207.diff
View Options
diff --git a/keyserver/src/keyserver.js b/keyserver/src/keyserver.js
--- a/keyserver/src/keyserver.js
+++ b/keyserver/src/keyserver.js
@@ -47,6 +47,7 @@
import { initENSCache } from './utils/ens-cache.js';
import { initFCCache } from './utils/fc-cache.js';
import { getContentSigningKey } from './utils/olm-utils.js';
+import { isPrimaryNode } from './utils/primary-secondary-utils.js';
import { getRunServerConfig } from './utils/server-utils.js';
import {
prefetchAllURLFacts,
@@ -89,9 +90,6 @@
const isCPUProfilingEnabled = process.env.KEYSERVER_CPU_PROFILING_ENABLED;
const areEndpointMetricsEnabled =
process.env.KEYSERVER_ENDPOINT_METRICS_ENABLED;
- const isPrimaryNode = process.env.COMM_NODE_ROLE
- ? process.env.COMM_NODE_ROLE === 'primary'
- : true;
if (cluster.isMaster) {
if (isPrimaryNode) {
diff --git a/keyserver/src/utils/primary-secondary-utils.js b/keyserver/src/utils/primary-secondary-utils.js
new file mode 100644
--- /dev/null
+++ b/keyserver/src/utils/primary-secondary-utils.js
@@ -0,0 +1,5 @@
+// @flow
+
+export const isPrimaryNode: boolean = process.env.COMM_NODE_ROLE
+ ? process.env.COMM_NODE_ROLE === 'primary'
+ : true;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 6:30 AM (7 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5954878
Default Alt Text
D12846.1768804207.diff (1 KB)
Attached To
Mode
D12846: [keyserver] move `isPrimaryNode` to keyserver utils
Attached
Detach File
Event Timeline
Log In to Comment