19 lines
500 B
Python
19 lines
500 B
Python
"""
|
|
Airflow plugins initialization.
|
|
"""
|
|
import os
|
|
import logging
|
|
|
|
# Set the custom secrets masker
|
|
os.environ['AIRFLOW__LOGGING__SECRETS_MASKER_CLASS'] = 'custom_secrets_masker.CustomSecretsMasker'
|
|
|
|
# Apply Thrift patches
|
|
try:
|
|
from patch_thrift_exceptions import patch_thrift_exceptions
|
|
patch_thrift_exceptions()
|
|
except Exception as e:
|
|
logging.error(f"Error applying Thrift exception patches: {e}")
|
|
|
|
logger = logging.getLogger(__name__)
|
|
logger.info("Airflow custom configuration applied")
|