Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

Orchestrator: exclude handlers field from being serialized#370

Merged
jlowin merged 2 commits intoprefect-archive:mainfrom
teocns:main
Oct 29, 2024
Merged

Orchestrator: exclude handlers field from being serialized#370
jlowin merged 2 commits intoprefect-archive:mainfrom
teocns:main

Conversation

@teocns
Copy link
Copy Markdown
Contributor

@teocns teocns commented Oct 29, 2024

Attempting to serialize an Event entity within a custom Handler / AsyncHandler would raise an error on .json() due to the handler not being serializable - which makes sense, as it is not a pydantic model.
A handler usually points to a callable python object (or a collection of them) which do not belong into a serialization context

…t from being included in model serialization
Copy link
Copy Markdown
Collaborator

@jlowin jlowin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @teocns! Great catch.

@jlowin jlowin merged commit 973d663 into prefect-archive:main Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants