You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/25 12:50:14 UTC

[GitHub] [airflow] ashb commented on a change in pull request #19821: Sanity check for MySQL's TIMESTAMP column

ashb commented on a change in pull request #19821:
URL: https://github.com/apache/airflow/pull/19821#discussion_r756862089



##########
File path: airflow/sensors/base.py
##########
@@ -41,6 +42,13 @@
 # See  https://github.com/apache/airflow/issues/16035
 from airflow.utils.decorators import apply_defaults
 
+# As documented in https://dev.mysql.com/doc/refman/5.7/en/datetime.html.
+_MYSQL_TIMESTAMP_MAX = datetime.datetime(2038, 1, 19, 3, 14, 7, tzinfo=timezone.utc)
+
+
+def _is_metadatabase_mysql() -> bool:
+    return settings.engine and settings.engine.url.get_backend_name() == "mysql"

Review comment:
       Cache this? Move it in to settings.py?




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org