• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 195

Backtrace:

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/views/question.php
Line: 195
Function: _error_handler

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/controllers/Questions.php
Line: 416
Function: view

File: /home/u125378470/domains/lawhelpguru.org/public_html/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Airflow - call a operator inside a function

<button aria-describedby="--stacks-s-tooltip-i92jsytu" aria-label="Bookmark" aria-pressed="false" class="js-bookmark-btn s-btn s-btn__unset c-pointer py4 js-gps-track" data-controller="s-tooltip" data-gps-track="post.click({ item: 1, priv: 0, post_type: 1 })" data-s-tooltip-placement="right" data-selected-classes="fc-yellow-600"></button><svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18" viewbox="0 0 19 18" width="19"></svg>

 

I'm trying to call a python operator which is inside a function using another python operator. Seems something I missed, can someone help me to find out what I missed.

from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
from airflow.operators.bash_operator import BashOperator
from datetime import datetime

args = {
    'owner': 'airflow',
    'start_date': '2018, 11, 1',
    'retries': 0

}

def testfunc(taskid,dagname):
    BashOperator(
    task_id=taskid,
    bash_command='echo "wwwwwwwwwwwwwww"',
    default_args=args,
    dag=dagname)



with DAG('python_dag', description='Python DAG', schedule_interval='*/15 * * * *', start_date=datetime(2018, 11, 1), catchup=False) as dag:
    python_task = PythonOperator(task_id='python_task', python_callable=testfunc,op_args=['ttest-task',dag])
 
    python_task