From 31acda9d7df112b5430aaa03ddade4b8a2cfe184 Mon Sep 17 00:00:00 2001 From: Pol Alvarez Date: Thu, 21 Apr 2022 10:56:15 +0200 Subject: [PATCH] added debug logs --- src/api/route-services/gem2s.js | 1 + src/api/route-services/pipeline-response.js | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/api/route-services/gem2s.js b/src/api/route-services/gem2s.js index 1c71249e1..b5231c4a1 100644 --- a/src/api/route-services/gem2s.js +++ b/src/api/route-services/gem2s.js @@ -19,6 +19,7 @@ const logger = getLogger(); const pipelineHook = new PipelineHook(); +// TODO here we are reusing the jwt so if gem2s was longer than 1 hour it will fail. pipelineHook.register('uploadToAWS', [saveProcessingConfigFromGem2s, runQCPipeline]); pipelineHook.registerAll([sendNotification]); diff --git a/src/api/route-services/pipeline-response.js b/src/api/route-services/pipeline-response.js index 84a1069ab..cd8d58385 100644 --- a/src/api/route-services/pipeline-response.js +++ b/src/api/route-services/pipeline-response.js @@ -118,9 +118,12 @@ class PipelineService { } static async qcResponse(io, message) { + console.log('starting qc response', message); AWSXRay.getSegment().addMetadata('message', message); + console.log('validating request'); await validateRequest(message, 'PipelineResponse.v1.yaml'); + console.log('running hooks'); await pipelineHook.run(message); const { experimentId } = message; @@ -128,13 +131,20 @@ class PipelineService { let output = null; // if there aren't errors proceed with the updates + console.log('and the rest is silence'); if (!error && 'output' in message) { const { input: { sampleUuid, taskName } } = message; + console.log('getS3Output'); output = await this.getS3Output(message); + console.log('updatePlotData'); await this.updatePlotData(taskName, experimentId, output); + console.log('updateProcessingConfig'); await this.updateProcessingConfig(taskName, experimentId, output, sampleUuid); } + + console.log('and the rest is not silence'); + // we want to send the update to the subscribed both in successful and error case await this.sendUpdateToSubscribed(experimentId, message, output, error, io); }