git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessing execution_date inside a function


I am using TimeDeltaSensor and would like to pass a delta value that
depends on the execution_date. The delta depends on the day of the week of
the execution_date.

        wait_for_data = TimeDeltaSensor(
            task_id="wait_for_data",
            delta=get_delta(),
            poke_interval=60 * 10,
            timeout=60 * 60 * (24 * 7 + 2),
            retries=10,
            dag=dag)

Is it possible to access the execution_date from inside the get_delta
function? How?

Thanks,

Pedro


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-airflow-development/msg03616.html on line 86
Call Stack
#TimeMemoryFunctionLocation
10.0013363128{main}( ).../msg03616.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-airflow-development/msg03616.html on line 86
Call Stack
#TimeMemoryFunctionLocation
10.0013363128{main}( ).../msg03616.html:0