ferruzzi commented on code in PR #57222:
URL: https://github.com/apache/airflow/pull/57222#discussion_r2466699612


##########
airflow-core/docs/howto/deadline-alerts.rst:
##########
@@ -328,24 +328,95 @@ Custom References
 ^^^^^^^^^^^^^^^^^
 
 While the built-in references should cover most use cases, and more will be 
released over time, you
-can create custom references by implementing a class that inherits from 
DeadlineReference.  This may
-be useful if you have calendar integrations or other sources that you want to 
use as a reference.
+can create custom references.  This may be useful if you have calendar 
integrations or other sources
+that you want to use as a reference.  You can create custom references by 
implementing a class that
+inherits from BaseDeadlineReference, give it am _evaluate_with() method, and 
register it.  There are
+two ways to accomplish this.  The recommended way is to use the 
``@deadline_reference`` decorator
+but for more complicated implementations, the ``register_custom_reference()`` 
method is available.
+
+**Recommended: Using the decorator**
 
 .. code-block:: python
 
-    class CustomReference(DeadlineReference):
-        """A deadline reference that uses a custom data source."""
+    from airflow._shared.timezones.timezone import datetime

Review Comment:
   I'll change it to `from airflow.sdk.timezone import datetime`, good catch



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