Skip to content

Commit

Permalink
Merge pull request #46 from divyamadala30/add-request
Browse files Browse the repository at this point in the history
Add request id when parsing sample metadata
  • Loading branch information
ao508 authored Nov 30, 2022
2 parents 2028204 + e11b766 commit 1f47eb1
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.Phaser;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mskcc.cmo.messaging.Gateway;
Expand Down Expand Up @@ -583,6 +585,12 @@ public void onMessage(Message msg, Object message) {
String.class);
SampleMetadata sampleMetadata =
mapper.readValue(sampleMetadataJson, SampleMetadata.class);
if (StringUtils.isEmpty(sampleMetadata.getIgoRequestId())) {
String requestId = ObjectUtils.firstNonNull(
sampleMetadata.getAdditionalProperties().get("requestId"),
sampleMetadata.getAdditionalProperties().get("igoRequestId"));
sampleMetadata.setIgoRequestId(requestId);
}
messageHandlingService.cmoSampleLabelUpdateHandler(sampleMetadata);
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit 1f47eb1

Please sign in to comment.