kaxil commented on a change in pull request #6905: [AIRFLOW-6361] Run 
LocalTaskJob directly in Celery task
URL: https://github.com/apache/airflow/pull/6905#discussion_r362006526
 
 

 ##########
 File path: airflow/bin/cli.py
 ##########
 @@ -1063,3 +1063,26 @@ def _add_subcommand(cls, subparsers, sub):
 def get_parser():
     """Calls static method inside factory which creates argument parser"""
     return CLIFactory.get_parser()
+
+
+def exec_airflow_command(command_to_exec: List[str]):
+    """
+    Execute command using CLI.
+
+    The command is run in the current process and thread.
+
+    :param command_to_exec: list of program arguments. The first element 
should contain the "airflow" element.
+    :type command_to_exec List[str]
+    """
+    parser = CLIFactory.get_parser()
+
+    if not command_to_exec:
 
 Review comment:
   Do we need this? As `command_to_exec` is a required parameter.
   
   Or do you want to raise any error when it is `None` or `[]`, in which case 
we should update the error msg

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to