Skip to content

Commit

Permalink
fix(providers/amazon): fix wrong completed condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-W committed Feb 3, 2024
1 parent 86f9c19 commit ba7596a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airflow/providers/amazon/aws/operators/sagemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ def execute(self, context: Context) -> dict:
{},
[],
instance_count,
LogState.TAILING if job_already_completed else LogState.COMPLETE,
LogState.COMPLETE if job_already_completed else LogState.TAILING,
description,
last_describe_job_call,
)
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/amazon/aws/triggers/sagemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
instance_count = last_description["ResourceConfig"]["InstanceCount"]
status = last_description["TrainingJobStatus"]
job_already_completed = status not in self.hook.non_terminal_states
state = LogState.TAILING if job_already_completed else LogState.COMPLETE
state = LogState.COMPLETE if job_already_completed else LogState.TAILING
last_describe_job_call = time.time()
while True:
try:
Expand Down

0 comments on commit ba7596a

Please sign in to comment.