Created
January 24, 2023 04:02
-
-
Save anna-geller/67f2cdc16880c82e850dcb070b6bda7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow.decorators import dag, task | |
import pendulum | |
from airflow_prefect import send_prefect_event_callback | |
@dag( | |
schedule=None, | |
start_date=pendulum.datetime(2023, 1, 24, tz="UTC"), | |
catchup=False, | |
default_args={ | |
"on_success_callback": send_prefect_event_callback, | |
"on_failure_callback": send_prefect_event_callback, | |
}, | |
tags=["prefect"], | |
) | |
def sync_event_from_callback_succeess(): | |
@task() | |
def reliable_task(): | |
print("Reliable task 🚀") | |
reliable_task() | |
sync_event_from_callback_succeess() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment