zhbdesign commented on issue #9828:
URL: https://github.com/apache/airflow/issues/9828#issuecomment-659174687
I succeeded in executing the task alone,commond:airflow run
user_MySql_2_ClickHouse_increment_srt_Activity
MySql_2_ClickHouse_Activity_Activity_inc 2020-07-16T14:17:49.938312+08:00.
Testing with Python was also successful,The Python code is as follows:
def execute_command(command_to_exec):
"""Executes command."""
if command_to_exec[0:2] != ["airflow", "run"]:
raise ValueError("The command must start with ")
print("ZHB command in Celery: %s", command_to_exec)
env = os.environ.copy()
print("ZHB env in Celery: %s", env)
subprocess.check_call(command_to_exec, stderr=subprocess.STDOUT,
close_fds=True, env=env)
print("ZHB command in Celery2: %s", command_to_exec)
print("ZHB env in Celery2: %s", env)
execute_command(['airflow', 'run',
'user_MySql_2_ClickHouse_increment_srt_Activity',
'MySql_2_ClickHouse_Activity_Activity_View_Count_inc',
'2020-07-16T13:05:24.286872+08:00', '--local', '--pool', 'default_pool', '-sd',
'/opt/airflow/dags/MySql_2_ClickHouse_srt_Activity.py'])
----------------------------------------------------------------
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]