Skip to content

Commit 353723f

Browse files
committed
NRL-1320 changes as per review
1 parent fb55109 commit 353723f

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

terraform/account-wide-infrastructure/modules/glue/glue.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ resource "aws_glue_crawler" "log_crawler" {
4242
s3_target {
4343
path = "${aws_s3_bucket.target-data-bucket.id}/producer_upsertDocumentReference/"
4444
}
45-
s3_target {
46-
path = "${aws_s3_bucket.source-data-bucket.id}/2025/"
47-
}
4845
schema_change_policy {
4946
delete_behavior = "LOG"
5047
}

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,12 @@ def run(self):
5252

5353
def get_last_run(self):
5454
all_runs = self.glue.get_job_runs(JobName=self.job_name)
55-
last_runtime = None
56-
if all_runs["JobRuns"]:
57-
for i in all_runs["JobRuns"]:
58-
if i["JobRunState"] == "SUCCEEDED":
59-
last_runtime = time.mktime(i["StartedOn"].timetuple())
60-
break
61-
else:
62-
continue
55+
if not all_runs["JobRuns"]:
56+
return None
6357

64-
return last_runtime
58+
for run in all_runs["JobRuns"]:
59+
if run["JobRunState"] == "SUCCEEDED":
60+
return time.mktime(run["StartedOn"].timetuple())
6561

6662
def extract(self):
6763
"""Extract JSON data from S3"""

0 commit comments

Comments
 (0)