From 19a077efe4c7e811fad541d473a2241f5181c54c Mon Sep 17 00:00:00 2001 From: Pol Alvarez Date: Tue, 21 Jun 2022 13:12:39 +0200 Subject: [PATCH] added state machine & context logs --- src/api.v2/helpers/pipeline/pipelineConstruct/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/api.v2/helpers/pipeline/pipelineConstruct/index.js b/src/api.v2/helpers/pipeline/pipelineConstruct/index.js index 6ed86cc55..1f60dce54 100644 --- a/src/api.v2/helpers/pipeline/pipelineConstruct/index.js +++ b/src/api.v2/helpers/pipeline/pipelineConstruct/index.js @@ -5,6 +5,7 @@ const _ = require('lodash'); const AWSXRay = require('aws-xray-sdk'); const fetch = require('node-fetch'); const { v4: uuidv4 } = require('uuid'); +const util = require('util'); const config = require('../../../../config'); const { QC_PROCESS_NAME, GEM2S_PROCESS_NAME } = require('../constants'); @@ -253,6 +254,8 @@ const createQCPipeline = async (experimentId, processingConfigUpdates, authJWT) const stateMachineArn = await createNewStateMachine(context, stateMachine, QC_PROCESS_NAME); logger.log(`State machine with ARN ${stateMachineArn} created, launching it...`); + logger.log('Context:', util.inspect(context, { showHidden: false, depth: null, colors: false })); + logger.log('State machine:', util.inspect(stateMachine, { showHidden: false, depth: null, colors: false })); const execInput = { samples: samplesOrder.map((sampleUuid, index) => ({ sampleUuid, index })), @@ -302,6 +305,8 @@ const createGem2SPipeline = async (experimentId, taskParams) => { const stateMachineArn = await createNewStateMachine(context, stateMachine, GEM2S_PROCESS_NAME); logger.log(`State machine with ARN ${stateMachineArn} created, launching it...`); + logger.log('Context:', util.inspect(context, { showHidden: false, depth: null, colors: false })); + logger.log('State machine:', util.inspect(stateMachine, { showHidden: false, depth: null, colors: false })); const executionArn = await executeStateMachine(stateMachineArn); logger.log(`Execution with ARN ${executionArn} created.`);