You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Kaxil Naik (Jira)" <ji...@apache.org> on 2019/11/15 18:25:00 UTC
[jira] [Created] (AIRFLOW-5940) Remove redundant Code in
models.dagrun
Kaxil Naik created AIRFLOW-5940:
-----------------------------------
Summary: Remove redundant Code in models.dagrun
Key: AIRFLOW-5940
URL: https://issues.apache.org/jira/browse/AIRFLOW-5940
Project: Apache Airflow
Issue Type: Improvement
Components: core
Affects Versions: 1.10.6, 2.0.0
Reporter: Kaxil Naik
Assignee: Kaxil Naik
The below code in models.dagrun contains redundant code
{code:python}
is_task_in_dag = task is not None
should_restore_task = is_task_in_dag and ti.state == State.REMOVED
{code}
It can be simplified by:
{code:python}
should_restore_task = (task is not None) and ti.state == State.REMOVED
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)