Skip to content

Commit

Permalink
chore(dag_generator): rename task
Browse files Browse the repository at this point in the history
  • Loading branch information
nitaibezerra committed Mar 26, 2023
1 parent 705dc97 commit 3d7427a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dou_dag_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ def create_dag(self, specs: DAGConfig, config_file: str) -> DAG:
)
term_list = "{{ ti.xcom_pull(task_ids='select_terms_from_db') }}"

exec_dou_search_task = PythonOperator(
task_id='exec_dou_search',
exec_search_task = PythonOperator(
task_id='exec_search',
python_callable=self.perform_searches,
op_kwargs={
'sources': specs.sources,
Expand All @@ -171,13 +171,13 @@ def create_dag(self, specs: DAGConfig, config_file: str) -> DAG:
},
)
if specs.sql:
select_terms_from_db_task >> exec_dou_search_task # pylint: disable=pointless-statement
select_terms_from_db_task >> exec_search_task # pylint: disable=pointless-statement

has_matches_task = BranchPythonOperator(
task_id='has_matches',
python_callable=self.has_matches,
op_kwargs={
'search_result': "{{ ti.xcom_pull(task_ids='exec_dou_search') }}",
'search_result': "{{ ti.xcom_pull(task_ids='exec_search') }}",
'skip_null': specs.skip_null,
},
)
Expand All @@ -189,11 +189,11 @@ def create_dag(self, specs: DAGConfig, config_file: str) -> DAG:
python_callable=Notifier(specs).send_notification,
op_kwargs={
'search_report':
"{{ ti.xcom_pull(task_ids='exec_dou_search') }}",
"{{ ti.xcom_pull(task_ids='exec_search') }}",
'report_date': template_ano_mes_dia_trigger_local_time,
})

exec_dou_search_task >> has_matches_task # pylint: disable=pointless-statement
exec_search_task >> has_matches_task # pylint: disable=pointless-statement
has_matches_task >> [
send_notification_task, skip_notification_task]

Expand Down

0 comments on commit 3d7427a

Please sign in to comment.