Skip to content

Commit

Permalink
Merge pull request #66 from ghrcdaac/mlh0079-clear-tmp
Browse files Browse the repository at this point in the history
 - Added cleanup call for local files in the lambda environment and r…
  • Loading branch information
sflynn-itsc authored May 14, 2024
2 parents 60a7e1d + 346e76f commit 5238f4e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 14 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module "dmrpp-generator" {
cluster_arn = module.cumulus.ecs_cluster_arn
region = var.region
prefix = var.prefix
account_id = var.account_id
// Optional Activity Parameters
docker_image = "ghrcdaac/dmrpp-generator:<tag_num>" // default to the correct release
Expand Down
10 changes: 7 additions & 3 deletions dmrpp_generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,13 @@ def dmrpp_generate(self, input_file, local=False, dmrpp_meta=None, args=None):


def main(event, context):
print('main event')
print(event)
return DMRPPGenerator(**event).process()
dmrpp = DMRPPGenerator(**event)
try:
ret = dmrpp.process()
finally:
dmrpp.clean_all()

return ret


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion dmrpp_generator/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "v5.0.0"
__version__ = "v5.0.1"
1 change: 0 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module "dmrpp_service" {

module "dmrpp_lambda" {
source = "./modules/dmrpp_lambda"
account_id = var.account_id

region = var.region
prefix = var.prefix
Expand Down
4 changes: 0 additions & 4 deletions modules/dmrpp_lambda/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ variable "region" {
default = "us-west-2"
}

variable "account_id" {
type = string
}

variable "prefix" {
type = string
description = "Cumulus stack prefix"
Expand Down
4 changes: 0 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ variable "aws_profile" {
default = null
}

variable "account_id" {
type = string
}

variable "region" {
type = string
default = "us-west-2"
Expand Down

0 comments on commit 5238f4e

Please sign in to comment.