Lee-W commented on code in PR #30227:
URL: https://github.com/apache/airflow/pull/30227#discussion_r1145907300
##########
airflow/providers/dbt/cloud/sensors/dbt.py:
##########
@@ -84,42 +135,10 @@ class DbtCloudJobRunAsyncSensor(DbtCloudJobRunSensor):
:param timeout: Time in seconds to wait for a job run to reach a terminal
status. Defaults to 7 days.
"""
- def __init__(
- self,
- *,
- poll_interval: float = 5,
- timeout: float = 60 * 60 * 24 * 7,
- **kwargs: Any,
- ):
- self.poll_interval = poll_interval
- self.timeout = timeout
- super().__init__(**kwargs)
-
- def execute(self, context: Context) -> None:
- """
- Defers to Trigger class to poll for state of the job run until
- it reaches a failure state or success state
- """
- end_time = time.time() + self.timeout
- self.defer(
- timeout=self.execution_timeout,
- trigger=DbtCloudRunJobTrigger(
- run_id=self.run_id,
- conn_id=self.dbt_cloud_conn_id,
- account_id=self.account_id,
- poll_interval=self.poll_interval,
- end_time=end_time,
- ),
- method_name="execute_complete",
+ def __init__(self, **kwargs: Any) -> None:
+ warnings.warn(
+ "Class `DbtCloudJobRunAsyncSensor` is deprecated and will be
removed in a future release. "
+ "Please use `DbtCloudJobRunSensor` and set `deferrable` attribute
to `True` instead",
+ DeprecationWarning,
)
Review Comment:
yes, I think so. just added it. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]