Skip to content

Commit 0ae8e87

Browse files
committed
black formatting
1 parent f5331a1 commit 0ae8e87

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lambda_function.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def lambda_handler(event, lambda_context):
7373
# Download monitor file
7474
monitor_file_name = f"{queueId.split('Queue')[0]}SpotFleetRequestId.json"
7575
monitor_local_name = f"/tmp/{monitor_file_name}"
76-
monitor_on_bucket_name = (f"monitors/{monitor_file_name}")
76+
monitor_on_bucket_name = f"monitors/{monitor_file_name}"
7777

7878
with open(monitor_local_name, "wb") as f:
7979
try:
@@ -102,7 +102,9 @@ def lambda_handler(event, lambda_context):
102102
if "ApproximateNumberOfMessagesNotVisible" in event["Records"][0]["Sns"]["Message"]:
103103
print("No messages in progress. Cleaning up.")
104104
ecs.update_service(
105-
cluster=monitorcluster, service=f"{monitorapp}Service", desiredCount=0,
105+
cluster=monitorcluster,
106+
service=f"{monitorapp}Service",
107+
desiredCount=0,
106108
)
107109
print("Service has been downscaled")
108110

@@ -176,8 +178,10 @@ def lambda_handler(event, lambda_context):
176178
)
177179

178180
# Remove Cloudwatch dashboard if created and cleanup desired
179-
if CLEAN_DASHBOARD.lower()=='true':
181+
if CLEAN_DASHBOARD.lower() == "true":
180182
dashboard_list = cloudwatch.list_dashboards()
181183
for entry in dashboard_list["DashboardEntries"]:
182184
if monitorapp in entry["DashboardName"]:
183-
cloudwatch.delete_dashboards(DashboardNames=[entry["DashboardName"]])
185+
cloudwatch.delete_dashboards(
186+
DashboardNames=[entry["DashboardName"]]
187+
)

0 commit comments

Comments
 (0)