新增
This commit is contained in:
@@ -14,7 +14,6 @@ with MyDAG(
|
|||||||
catchup=True,
|
catchup=True,
|
||||||
) as dag:
|
) as dag:
|
||||||
print("enter in MyDAG CHILD")
|
print("enter in MyDAG CHILD")
|
||||||
super.__init__()
|
|
||||||
t1 = BashOperator(
|
t1 = BashOperator(
|
||||||
task_id='amap_key_generate',
|
task_id='amap_key_generate',
|
||||||
bash_command='python /opt/airflow/dags/repo/dags/business/business/amap_key_generate.py',
|
bash_command='python /opt/airflow/dags/repo/dags/business/business/amap_key_generate.py',
|
||||||
|
|||||||
+9
-2
@@ -1,17 +1,24 @@
|
|||||||
from airflow import DAG
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from airflow.operators.bash import BashOperator
|
from airflow.operators.bash import BashOperator
|
||||||
|
|
||||||
|
from airflow.models import DAG
|
||||||
|
|
||||||
|
|
||||||
|
class MyDAG(DAG):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class MyDAG(DAG):
|
class MyDAG(DAG):
|
||||||
print("enter in MyDAG")
|
print("enter in MyDAG")
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
print('SUCCESS')
|
print('SUCCESS')
|
||||||
super().__init__(
|
super().__init__(
|
||||||
*args, **kwargs
|
*args, **kwargs
|
||||||
)
|
)
|
||||||
BashOperator(
|
install = BashOperator(
|
||||||
task_id='install_required',
|
task_id='install_required',
|
||||||
bash_command='pip install -I -r requirements.txt -i https://repo.fangjia.com/repository/pypi-public/simple/',
|
bash_command='pip install -I -r requirements.txt -i https://repo.fangjia.com/repository/pypi-public/simple/',
|
||||||
)
|
)
|
||||||
|
install
|
||||||
print('OK')
|
print('OK')
|
||||||
Reference in New Issue
Block a user