Skip to content

Commit 3755b23

Browse files
committed
NRL-1411 pass through loop var to lambda
1 parent c1c9dc6 commit 3755b23

File tree

1 file changed

+3
-3
lines changed
  • terraform/account-wide-infrastructure/modules/glue/src

1 file changed

+3
-3
lines changed

terraform/account-wide-infrastructure/modules/glue/src/pipeline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def run(self):
5050
raise e
5151

5252
def get_last_run(self):
53-
self.logger.info(f"Retrieving last successful runtime.")
53+
self.logger.info("Retrieving last successful runtime.")
5454
all_runs = self.glue.get_job_runs(JobName=self.job_name)
5555
if not all_runs["JobRuns"]:
5656
return None
@@ -75,7 +75,7 @@ def extract_dynamic(self):
7575
connection_options={"paths": [self.source_path], "recurse": True},
7676
format="json",
7777
).filter(
78-
f=lambda x: (x["host"].endswith(name))
78+
f=lambda x, n=name: (x["host"].endswith(n))
7979
and (x["time"] > last_runtime)
8080
)
8181

@@ -84,7 +84,7 @@ def extract_dynamic(self):
8484
connection_type="s3",
8585
connection_options={"paths": [self.source_path], "recurse": True},
8686
format="json",
87-
).filter(f=lambda x: x["host"].endswith(name))
87+
).filter(f=lambda x, n=name: x["host"].endswith(n))
8888

8989
return data
9090

0 commit comments

Comments
 (0)