uranusjr commented on code in PR #58543:
URL: https://github.com/apache/airflow/pull/58543#discussion_r3732269743


##########
task-sdk/src/airflow/sdk/definitions/timetables/assets.py:
##########
@@ -84,3 +85,23 @@ class AssetOrTimeSchedule(AssetTriggeredTimetable):
     def __attrs_post_init__(self) -> None:
         self.active_runs_limit = self.timetable.active_runs_limit
         self.can_be_scheduled = self.timetable.can_be_scheduled
+
+
[email protected](kw_only=True)
+class AssetAndTimeSchedule(BaseTimetable):
+    """
+    Combine time-based scheduling with asset conditions.
+
+    :param assets: An asset or list of assets, in the same format as
+        ``DAG(schedule=...)`` when using event-driven scheduling. This is used
+        to evaluate whether a scheduled run can be created.
+    :param timetable: A timetable instance to evaluate time-based scheduling.
+    """
+
+    asset_gated = True
+    asset_condition: BaseAsset = attrs.field(alias="assets", 
converter=_coerce_assets)
+    timetable: BaseTimetable
+
+    def __attrs_post_init__(self) -> None:
+        self.active_runs_limit = self.timetable.active_runs_limit
+        self.can_be_scheduled = self.timetable.can_be_scheduled

Review Comment:
   Should these be properties instead?



-- 
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]

Reply via email to