From 338f8ebdbbcd08b76c9e6363cba39f639d4b4b3a Mon Sep 17 00:00:00 2001 From: Theo Ilie Date: Wed, 20 Jul 2022 11:40:01 -0700 Subject: [PATCH] Clean up misc state machine (#3518) --- creator-node/src/services/stateMachineManager/index.js | 1 - .../src/services/stateMachineManager/makeOnCompleteCallback.js | 2 +- .../src/services/stateMachineManager/stateMachineConstants.js | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/creator-node/src/services/stateMachineManager/index.js b/creator-node/src/services/stateMachineManager/index.js index 90dd651d150..c058a73622d 100644 --- a/creator-node/src/services/stateMachineManager/index.js +++ b/creator-node/src/services/stateMachineManager/index.js @@ -4,7 +4,6 @@ const config = require('../../config') const { logger: baseLogger } = require('../../logging') const StateMonitoringManager = require('./stateMonitoring') const StateReconciliationManager = require('./stateReconciliation') -const NodeToSpIdManager = require('./CNodeToSpIdMapManager') const { RECONFIG_MODES } = require('./stateMachineConstants') const QueueInterfacer = require('./QueueInterfacer') const makeOnCompleteCallback = require('./makeOnCompleteCallback') diff --git a/creator-node/src/services/stateMachineManager/makeOnCompleteCallback.js b/creator-node/src/services/stateMachineManager/makeOnCompleteCallback.js index cdd96e32d92..987d117f6b1 100644 --- a/creator-node/src/services/stateMachineManager/makeOnCompleteCallback.js +++ b/creator-node/src/services/stateMachineManager/makeOnCompleteCallback.js @@ -65,7 +65,7 @@ module.exports = function ( logger.info(`Job successfully completed. Parsing result: ${resultString}`) jobResult = JSON.parse(resultString) || {} } catch (e) { - logger.warn(`Failed to parse job result string`) + logger.error(`Failed to parse job result string`) return } diff --git a/creator-node/src/services/stateMachineManager/stateMachineConstants.js b/creator-node/src/services/stateMachineManager/stateMachineConstants.js index 37509292a40..74c52aa294a 100644 --- a/creator-node/src/services/stateMachineManager/stateMachineConstants.js +++ b/creator-node/src/services/stateMachineManager/stateMachineConstants.js @@ -14,6 +14,9 @@ module.exports = { // Max millis to run a StateReconciliationQueue job for before marking it as stalled (1 hour) STATE_RECONCILIATION_QUEUE_MAX_JOB_RUNTIME_MS: 1000 * 60 * 60, + // Max millis to run a manual sync job for before marking it as stalled (60 seconds) + MANUAL_SYNC_QUEUE_MAX_JOB_RUNTIME_MS: 1000 * 60, + // Millis to timeout request for getting users who have a node as their primary/secondary (60 seconds) GET_NODE_USERS_TIMEOUT_MS: 1000 * 60,