Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 02:33 PM
Hi @zmsoft
The event hook provided, user_event_hook, must be a Python callable that accepts exactly one parameter - a dictionary representation of the event that triggered the execution of this event hook. The return value of the event hook has no significance.
Please find an example here -
@on_event_hook
def my_event_hook(event):
if (
event["event_type"] == "update_progress"
and event["details"]["update_progress"]["state"] == "STOPPING"
):
print("Notified that update is stopping: ", event)