Skip to content

Commit

Permalink
Update fetch_eform_notices_by_date.py
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainOfHacks committed Feb 29, 2024
1 parent 66109f0 commit 1f7ebb8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dags/eforms_notices/fetch_eform_notices_by_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ted_sws.event_manager.adapters.event_log_decorator import event_log
from ted_sws.event_manager.model.event_message import TechnicalEventMessage, EventMessageMetadata, \
EventMessageProcessType
from ted_sws.event_manager.services.log import log_error
from ted_sws.event_manager.services.log import log_warning

DAG_NAME = "fetch_notices_by_date"
BATCH_SIZE = 2000
Expand Down Expand Up @@ -45,10 +45,9 @@ def fetch_by_date_notice_from_ted():

notice_ids = notice_fetcher_by_query_pipeline(query=query)
if not notice_ids:
log_error("No notices has been fetched!")
raise AirflowException("No notices has been")
else:
push_dag_downstream(key=NOTICE_IDS_KEY, value=notice_ids)
log_warning("No notices has been fetched!")

push_dag_downstream(key=NOTICE_IDS_KEY, value=notice_ids)

@task
@event_log(TechnicalEventMessage(
Expand Down

0 comments on commit 1f7ebb8

Please sign in to comment.