Skip to content

Commit

Permalink
🔥 remove TAKLER_TRIES from task. #41
Browse files Browse the repository at this point in the history
  • Loading branch information
perillaroc committed Jul 7, 2022
1 parent 58ed8e6 commit 5ddac47
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions takler/core/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
TAKLER_NAME = "TAKLER_NAME"
TAKLER_RID = "TAKLER_RID"
TAKLER_TRY_NO = "TAKLER_TRY_NO"

TAKLER_TRIES = "TAKLER_TRIES"


Expand Down
6 changes: 0 additions & 6 deletions takler/core/task_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def __init__(self, name: str):
self.aborted_reason: Optional[str] = None

self.try_no = 0
self.tries = None

self.generated_parameters: TaskNodeGeneratedParameters = TaskNodeGeneratedParameters(node=self)

Expand Down Expand Up @@ -195,7 +194,6 @@ class TaskNodeGeneratedParameters(BaseModel):
takler_name: Parameter = Parameter(TAKLER_NAME, None)
takler_rid: Parameter = Parameter(TAKLER_RID, None)
takler_try_no: Parameter = Parameter(TAKLER_TRY_NO, None)
takler_tries: Parameter = Parameter(TAKLER_TRIES, None)

class Config:
arbitrary_types_allowed = True
Expand All @@ -208,7 +206,6 @@ def update_parameters(self):
self.takler_name.value = self.node.node_path
self.takler_rid.value = self.node.task_id
self.takler_try_no.value = self.node.try_no
self.takler_tries.value = self.node.tries

def find_parameter(self, name: str) -> Optional[Parameter]:
if name == TASK:
Expand All @@ -219,8 +216,6 @@ def find_parameter(self, name: str) -> Optional[Parameter]:
return self.takler_rid
elif name == TAKLER_TRY_NO:
return self.takler_try_no
elif name == TAKLER_TRIES:
return self.takler_tries
else:
return None

Expand All @@ -230,7 +225,6 @@ def generated_parameters(self) -> Dict[str, Parameter]:
TAKLER_NAME: self.takler_name,
TAKLER_RID: self.takler_rid,
TAKLER_TRY_NO: self.takler_try_no,
TAKLER_TRIES: self.takler_tries,
}


Expand Down

0 comments on commit 5ddac47

Please sign in to comment.