Created
January 24, 2023 03:09
-
-
Save anna-geller/86cff420df951aef91626f30c61782dd to your computer and use it in GitHub Desktop.
This file contains 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