Is there any way to attach some kind of listener to a flow as it changes states? In Prefect 1 I would have done this with state handlers, but those don’t seem to be an option if I’m looking to monitor the flow status instead of task status. My use case is to sync the Flow status with our legacy (homegrown) orchestrator to help perform the migration, so it can almost be thought of as custom notifications.
Notifications only support Slack and Email, but this involves (at minimum) running some custom code to invoke a lambda.
If I could write my own notification type then that would do the trick.
n
Nate
08/30/2022, 1:45 PM
If I could write my own notification type then that would do the trick.
You can (if you're running your own orion instance)
in a similar way to how we've written the
Ooh that would probably do the trick. Let me give it a try. Thanks!
Josh Paulin
08/30/2022, 2:42 PM
Maybe I’m missing something here, but which part of the Notifications block is actually listening to the state change to call that
notify
method?
a
alex
08/30/2022, 3:46 PM
There is a service that runs server side that is responsible for invoking the
notify
method on a notification block for the appropriate state changes. The notification block needs to be available server side for sending notifications, so custom notification blocks require you to run your own Orion server. We’re working on supporting more notification types in Prefect Cloud.
j
Josh Paulin
08/30/2022, 3:49 PM
Ahh. Then in that case it seems like it won’t work for me since I’m using Cloud 😞
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.