Skip to content

Commit 6de56d7

Browse files
committed
lint
1 parent 44d7717 commit 6de56d7

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

e2e_batch/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-include .env
22

33
test:
4-
ENVIRONMENT=$(ENVIRONMENT) poetry run python -m unittest -v -c
4+
ENVIRONMENT=$(ENVIRONMENT) poetry run python -m unittest -v -c

e2e_batch/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
ack_metadata_queue_name = f"imms-{environment}-ack-metadata-queue.fifo"
2323
audit_table_name = f"immunisation-batch-{environment}-audit-table"
2424

25+
2526
class EventName():
2627
CREATE = "INSERT"
2728
UPDATE = "MODIFY"

e2e_batch/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@
2121
ACK_PREFIX,
2222
FILE_NAME_VAL_ERROR,
2323
HEADER_RESPONSE_CODE_COLUMN,
24-
ActionFlag,
25-
Operation,
2624
RAVS_URI,
2725
)
2826

27+
2928
def upload_file_to_s3(file_name, bucket, prefix):
3029
"""Upload the given file to the specified bucket under the provided prefix.
3130
Returns the S3 key if successful, or raises an exception."""
@@ -273,7 +272,7 @@ def fetch_pk_and_operation_from_dynamodb(identifier_pk):
273272
Logs any exceptions encountered during the DynamoDB query.
274273
"""
275274
try:
276-
response = table.query(
275+
response = events_table.query(
277276
IndexName="IdentifierGSI",
278277
KeyConditionExpression="IdentifierPK = :identifier_pk",
279278
ExpressionAttributeValues={":identifier_pk": identifier_pk},
@@ -391,6 +390,7 @@ def verify_final_ack_file(file_key):
391390
)
392391
return True
393392

393+
394394
def delete_filename_from_audit_table(filename) -> bool:
395395

396396
# 1. Query the GSI to get all items with the given filename
@@ -409,6 +409,7 @@ def delete_filename_from_audit_table(filename) -> bool:
409409
logger.error(f"Error deleting from audit table: {e}")
410410
return False
411411

412+
412413
def delete_filename_from_events_table(identifier) -> bool:
413414

414415
# 1. Query the GSI to get all items with the given filename
@@ -428,6 +429,7 @@ def delete_filename_from_events_table(identifier) -> bool:
428429
logger.warning(f"Error deleting from events table: {e}")
429430
return False
430431

432+
431433
def poll_s3_file_pattern(prefix, search_pattern):
432434
"""Poll the ACK_BUCKET for an ack file that contains the input_file_name as a substring."""
433435

0 commit comments

Comments
 (0)