eladkal commented on code in PR #70147:
URL: https://github.com/apache/airflow/pull/70147#discussion_r3647278210
##########
airflow-core/src/airflow/utils/db_cleanup.py:
##########
@@ -142,6 +162,18 @@ def readable_config(self):
}
+# We need `fallback=None` because this is executed at top level code and
provider configuration
+# (the celery provider) might not be loaded. When set, this points db clean at
the schema the
+# Celery result backend tables (celery_taskmeta, celery_tasksetmeta) actually
live in, for
+# deployments that provision the result backend into a schema other than the
metadata DB's default
+# (a common pattern to keep Celery's own tables separate from Airflow's).
+_celery_result_backend_schema = conf.get("celery", "result_backend_schema",
fallback=None)
+
+
+def _celery_table_name(name: str) -> str:
+ return f"{_celery_result_backend_schema}.{name}" if
_celery_result_backend_schema else name
Review Comment:
I am not sure about celery related code from airflow core.
It's a pattern we try to do the other way.. extract all provider related
stuff out
--
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]