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