[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7527: [AIRFLOW-6907] Simplify SchedulerJob
nuclearpinguin commented on a change in pull request #7527: [AIRFLOW-6907] Simplify SchedulerJob URL: https://github.com/apache/airflow/pull/7527#discussion_r383921545 ## File path: airflow/jobs/scheduler_job.py ## @@ -1098,37 +1094,20 @@ def _find_executable_task_instances(self, simple_dag_bag, states, session=None): TI = models.TaskInstance DR = models.DagRun DM = models.DagModel -ti_query = ( +task_instances_to_examine = ( session .query(TI) .filter(TI.dag_id.in_(simple_dag_bag.dag_ids)) .outerjoin( -DR, -and_(DR.dag_id == TI.dag_id, DR.execution_date == TI.execution_date) +DR, and_(DR.dag_id == TI.dag_id, DR.execution_date == TI.execution_date) ) -.filter(or_(DR.run_id == None, # noqa: E711 pylint: disable=singleton-comparison -not_(DR.run_id.like(BackfillJob.ID_PREFIX + '%' +.filter(or_(DR.run_id.is_(None), not_(DR.run_id.like(BackfillJob.ID_PREFIX + '%' .outerjoin(DM, DM.dag_id == TI.dag_id) -.filter(or_(DM.dag_id == None, # noqa: E711 pylint: disable=singleton-comparison -not_(DM.is_paused))) +.filter(or_(DM.dag_id.is_(None), not_(DM.is_paused))) Review comment: It's still in TODO list: https://github.com/PolideaInternal/airflow/blob/37c630da636d1ef352273e33fbdb417727914386/scripts/ci/pylint_todo.txt#L11 And I suppose that once I rebase onto new master I will have to fix it in more places... This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7527: [AIRFLOW-6907] Simplify SchedulerJob
nuclearpinguin commented on a change in pull request #7527: [AIRFLOW-6907] Simplify SchedulerJob URL: https://github.com/apache/airflow/pull/7527#discussion_r383920198 ## File path: airflow/jobs/scheduler_job.py ## @@ -1098,37 +1094,20 @@ def _find_executable_task_instances(self, simple_dag_bag, states, session=None): TI = models.TaskInstance DR = models.DagRun DM = models.DagModel -ti_query = ( +task_instances_to_examine = ( session .query(TI) .filter(TI.dag_id.in_(simple_dag_bag.dag_ids)) .outerjoin( -DR, -and_(DR.dag_id == TI.dag_id, DR.execution_date == TI.execution_date) +DR, and_(DR.dag_id == TI.dag_id, DR.execution_date == TI.execution_date) ) -.filter(or_(DR.run_id == None, # noqa: E711 pylint: disable=singleton-comparison -not_(DR.run_id.like(BackfillJob.ID_PREFIX + '%' +.filter(or_(DR.run_id.is_(None), not_(DR.run_id.like(BackfillJob.ID_PREFIX + '%' .outerjoin(DM, DM.dag_id == TI.dag_id) -.filter(or_(DM.dag_id == None, # noqa: E711 pylint: disable=singleton-comparison -not_(DM.is_paused))) +.filter(or_(DM.dag_id.is_(None), not_(DM.is_paused))) Review comment: I don't know, but here we do not run pylint over this file, do we? @ashb This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7527: [AIRFLOW-6907] Simplify SchedulerJob
nuclearpinguin commented on a change in pull request #7527: [AIRFLOW-6907] Simplify SchedulerJob URL: https://github.com/apache/airflow/pull/7527#discussion_r383920198 ## File path: airflow/jobs/scheduler_job.py ## @@ -1098,37 +1094,20 @@ def _find_executable_task_instances(self, simple_dag_bag, states, session=None): TI = models.TaskInstance DR = models.DagRun DM = models.DagModel -ti_query = ( +task_instances_to_examine = ( session .query(TI) .filter(TI.dag_id.in_(simple_dag_bag.dag_ids)) .outerjoin( -DR, -and_(DR.dag_id == TI.dag_id, DR.execution_date == TI.execution_date) +DR, and_(DR.dag_id == TI.dag_id, DR.execution_date == TI.execution_date) ) -.filter(or_(DR.run_id == None, # noqa: E711 pylint: disable=singleton-comparison -not_(DR.run_id.like(BackfillJob.ID_PREFIX + '%' +.filter(or_(DR.run_id.is_(None), not_(DR.run_id.like(BackfillJob.ID_PREFIX + '%' .outerjoin(DM, DM.dag_id == TI.dag_id) -.filter(or_(DM.dag_id == None, # noqa: E711 pylint: disable=singleton-comparison -not_(DM.is_paused))) +.filter(or_(DM.dag_id.is_(None), not_(DM.is_paused))) Review comment: I don't know, but here we do not run pylint over this file, do we? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services