airflow.providers.microsoft.azure.log.wasb_task_handler
¶
Module Contents¶
Classes¶
WasbTaskHandler is a python log handler that handles and reads task instance logs. |
Functions¶
Load delete_local_logs conf if Airflow version > 2.6 and return False if not. |
- airflow.providers.microsoft.azure.log.wasb_task_handler.get_default_delete_local_copy()[source]¶
Load delete_local_logs conf if Airflow version > 2.6 and return False if not.
TODO: delete this function when min airflow version >= 2.6
- class airflow.providers.microsoft.azure.log.wasb_task_handler.WasbTaskHandler(base_log_folder, wasb_log_folder, wasb_container, *, filename_template=None, **kwargs)[source]¶
Bases:
airflow.utils.log.file_task_handler.FileTaskHandler
,airflow.utils.log.logging_mixin.LoggingMixin
WasbTaskHandler is a python log handler that handles and reads task instance logs.
It extends airflow FileTaskHandler and uploads to and reads from Wasb remote storage.
- set_context(ti)[source]¶
Provide task_instance context to airflow task handler.
Generally speaking returns None. But if attr maintain_propagate has been set to propagate, then returns sentinel MAINTAIN_PROPAGATE. This has the effect of overriding the default behavior to set propagate to False whenever set_context is called. At time of writing, this functionality is only used in unit testing.
- Parameters
ti -- task instance object
- wasb_log_exists(remote_log_location)[source]¶
Check if remote_log_location exists in remote storage.
- wasb_read(remote_log_location, return_error=False)[source]¶
Return the log found at the remote_log_location. Returns '' if no logs are found or there is an error.