Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
torimcd committed May 29, 2024
1 parent 6eded09 commit ba5fc2d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 36 deletions.
7 changes: 5 additions & 2 deletions bignbit/save_cnm_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@ def process(self):
"""
pobit_audit_bucket = self.config['pobit_audit_bucket']
print(pobit_audit_bucket)
print(self.input.get('cnm_sent'))

collection_name = self.config['collection']
granule_ur = self.config['granule_ur']

print(collection_name)
print(granule_ur)
print(self.input)


cnm_content = self.input.get('cnm_sent')
cnm_content = self.input
print(cnm_content)

print(cnm_content)
print(cnm_content['submissionTime'])
Expand Down
69 changes: 35 additions & 34 deletions terraform/state_machine_definition.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,40 @@
"Type": "Task",
"Resource": "arn:aws:states:::lambda:invoke",
"TimeoutSeconds": 86400,
"End": true,
"Next": "SaveCNMMessage",
"ResultPath": "$.gitc_response"
}
},
"SaveCNMMessage": {
"Type": "Task",
"Resource": "${SaveCNMMessageLambda}",
"Parameters": {
"cma": {
"event.$": "$",
"task_config": {
"collection": "{$.collection_name}",
"granule_ur": "{$.granule_ur}",
"pobit_audit_bucket": "${PobitAuditBucket}",
"cumulus_message": {
"input": "{$.gitc_response}"
}
}
}
},
"Retry": [
{
"ErrorEquals": [
"Lambda.ServiceException",
"Lambda.AWSLambdaException",
"Lambda.SdkClientException",
"Lambda.TooManyRequestsException"
],
"IntervalSeconds": 2,
"MaxAttempts": 6,
"BackoffRate": 2
}
],
"Next": "WorkflowSucceeded"
},
}
},
"ResultPath": "$.payload.pobit",
Expand All @@ -472,39 +503,9 @@
"MaxAttempts": 1
}
],
"Next": "SaveCNMMessage"
},
"SaveCNMMessage": {
"Type": "Task",
"Resource": "${SaveCNMMessageLambda}",
"Parameters": {
"cma": {
"event.$": "$",
"task_config": {
"collection": "{$.collection_name}",
"granule_ur": "{$.granule_ur}",
"pobit_audit_bucket": "${PobitAuditBucket}",
"cumulus_message": {
"input": "{$.payload.pobit}"
}
}
}
},
"Retry": [
{
"ErrorEquals": [
"Lambda.ServiceException",
"Lambda.AWSLambdaException",
"Lambda.SdkClientException",
"Lambda.TooManyRequestsException"
],
"IntervalSeconds": 2,
"MaxAttempts": 6,
"BackoffRate": 2
}
],
"Next": "WorkflowSucceeded"
"End": "True"
},

"WorkflowSucceeded": {
"Type": "Succeed"
},
Expand Down

0 comments on commit ba5fc2d

Please sign in to comment.