airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wang, Larry" <>
Subject RE: Qs on airflow
Date Wed, 11 Oct 2017 02:14:53 GMT
Any updates on this?

From: Wang, Larry
Sent: Tuesday, October 10, 2017 9:43 PM
To: 'Gerard Toonstra' <>; '' <>
Cc: Wang, Ming <>; Ren, Xiaoyu <>
Subject: RE: Qs on airflow

Hi Airflow experts,

I am trying to set a branch operator which will be executed another one branch at a time in
one Dag, the codes looks like this,

bbt_migrate_vm = DummyOperator()
bbt_migrate_vm_back = DummyOperator()

def migrate_choice():
    is_even = Variable.get("is_even")
    if is_even == "True":
        Variable.set("is_even", "False")
        return "bbt_migrate_vm_back"
        Variable.set("is_even", "True")
        return "bbt_migrate_vm"

But the problem is, I still need to check the previous status of the last iteration, say for
example, when I execute bbt_migrate_vm_back, I need to check the status of previous bbt_might_vm
in last run is pass, how should I achieve that?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message