Skip to content

Commit cb6edd1

Browse files
committed
Lint
1 parent 67ad758 commit cb6edd1

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/ecs.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ def update_service(
2424
)
2525

2626
def describe_services(self, cluster_name, app_name):
27-
result = self.boto.describe_services(
28-
cluster=cluster_name, services=[app_name])
27+
result = self.boto.describe_services(cluster=cluster_name, services=[app_name])
2928

3029
if "taskSets" in result["services"][0]:
3130
for taskSet in result["services"][0]["taskSets"]:
@@ -45,8 +44,7 @@ def register_task_definition(self, task_definition):
4544
return result
4645

4746
def describe_task_definition(self, task_definition):
48-
result = self.boto.describe_task_definition(
49-
taskDefinition=task_definition)
47+
result = self.boto.describe_task_definition(taskDefinition=task_definition)
5048
self.taskDefArn = result["taskDefinition"]["taskDefinitionArn"]
5149
return result
5250

@@ -56,8 +54,7 @@ def list_tasks(self, cluster_name: str, started_by, desired_status="STOPPED"):
5654
)
5755

5856
def describe_tasks(self, cluster_name: str, task_arns):
59-
result = self.boto.describe_tasks(
60-
cluster=cluster_name, tasks=task_arns)
57+
result = self.boto.describe_tasks(cluster=cluster_name, tasks=task_arns)
6158
self.status = result["tasks"][0]["lastStatus"]
6259
return result
6360

src/worker-deploy.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@
6868
)
6969

7070
ecs_deploy = list(
71-
filter(lambda x: x["status"] == "PRIMARY",
72-
deployment["services"][0]["deployments"])
71+
filter(lambda x: x["status"] == "PRIMARY", deployment["services"][0]["deployments"])
7372
)
7473
ecs_deploy_status = ecs_deploy[0]["rolloutState"]
7574

@@ -99,8 +98,7 @@ def rollback():
9998
# Check if containers are being stoped
10099
last_task = task.list_tasks(cluster_name, task.ecsDeployId)
101100
if len(last_task["taskArns"]) > 2:
102-
last_task_info = task.describe_tasks(
103-
cluster_name, last_task["taskArns"])
101+
last_task_info = task.describe_tasks(cluster_name, last_task["taskArns"])
104102
last_task_status = last_task_info["tasks"][0]["lastStatus"]
105103
last_task_reason = last_task_info["tasks"][0]["stoppedReason"]
106104
if "reason" in last_task_info["tasks"][0]["containers"][0]:

0 commit comments

Comments
 (0)