airflow.executors.celery_executor
¶
Module Contents¶
-
airflow.executors.celery_executor.
CELERY_FETCH_ERR_MSG_HEADER
= Error fetching Celery task state[source]¶
-
airflow.executors.celery_executor.
CELERY_SEND_ERR_MSG_HEADER
= Error sending Celery task[source]¶ To start the celery worker, run the command: airflow worker
-
class
airflow.executors.celery_executor.
ExceptionWithTraceback
(exception, exception_traceback)[source]¶ Bases:
object
Wrapper class used to propagate exceptions to parent processes from subprocesses.
-
airflow.executors.celery_executor.
fetch_celery_task_state
(celery_task)[source]¶ Fetch and return the state of the given celery task. The scope of this function is global so that it can be called by subprocesses in the pool.
-
class
airflow.executors.celery_executor.
CeleryExecutor
[source]¶ Bases:
airflow.executors.base_executor.BaseExecutor
CeleryExecutor is recommended for production use of Airflow. It allows distributing the execution of task instances to multiple worker nodes.
Celery is a simple, flexible and reliable distributed system to process vast amounts of messages, while providing operations with the tools required to maintain such a system.
-
_num_tasks_per_send_process
(self, to_send_count)[source]¶ How many Celery tasks should each worker process send.
- Returns
Number of tasks that should be sent per process
- Return type
-