Skip to content

Commit

Permalink
Fix the PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sunank200 committed Apr 25, 2024
1 parent e49e926 commit e28fff9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions airflow/providers/google/cloud/triggers/dataproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
}
)
return
self.log.info("Current state is %s", state)
self.log.info("Sleeping for %s seconds.", self.polling_interval_seconds)
await asyncio.sleep(self.polling_interval_seconds)
except asyncio.CancelledError:
Expand All @@ -205,7 +206,7 @@ async def fetch_cluster(self) -> Cluster:
project_id=self.project_id, region=self.region, cluster_name=self.cluster_name
)

async def delete_when_error_occurred(self, cluster: Cluster):
async def delete_when_error_occurred(self, cluster: Cluster) -> None:
"""
Delete the cluster on error.
Expand All @@ -218,9 +219,7 @@ async def delete_when_error_occurred(self, cluster: Cluster):
)
self.log.info("Cluster %s has been deleted.", self.cluster_name)
else:
self.log.info(
"Cluster %s is not be deleted as delete_on_error is set to False.", self.cluster_name
)
self.log.info("Cluster %s is not deleted as delete_on_error is set to False.", self.cluster_name)


class DataprocBatchTrigger(DataprocBaseTrigger):
Expand Down

0 comments on commit e28fff9

Please sign in to comment.