Skip to content

Commit

Permalink
added empty task into HomePlus_Dag
Browse files Browse the repository at this point in the history
  • Loading branch information
HyejiYu committed Sep 27, 2024
1 parent 44b8580 commit 0174345
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion airflow/HomePlus_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
from airflow.exceptions import AirflowSkipException
from airflow.operators.python import get_current_context
from airflow.operators.email import EmailOperator
from airflow.operators.empty import EmptyOperator
from datetime import datetime, timedelta
import json, requests



# 함수 정의: HTTP POST 요청
def send_post_request(categoryId):
load_dotenv()
Expand Down Expand Up @@ -80,6 +80,12 @@ def generate_queue_values():

category_ids = list(range(100001, 100078))

# 모든 병렬 태스크가 완료된 후의 마무리 태스크
final_task = EmptyOperator(
task_id='empty task',
dag=dag
)

# 실패 시 이메일 전송
send_failure_email = EmailOperator(
task_id='send_failure_email',
Expand Down

0 comments on commit 0174345

Please sign in to comment.