-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Support scheduling Activities within Workflows #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a13d4eb to
1081ec4
Compare
| name: str | ||
| type_hint: Type | None | ||
| default_value: Any | None | ||
| has_default: bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this field?
2175a82 to
d3576ce
Compare
| async def from_data( | ||
| self, payload: Payload, type_hints: List[Type | None] | ||
| ) -> List[Any]: | ||
| def from_data(self, payload: Payload, type_hints: List[Type | None]) -> List[Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember the original reason for making this async is to support blob retrieval. Is it no longer needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the DataConverter is async we can only use it within the main event loop. It's possible to keep it async but we would have to restructure how and when we convert values. When applying history events for example, we would need to convert all the resulting payloads first and then use them within the state machines.
I think we can explore making it async or introducing another concept in the future. For example, we could add some sort of processor that takes a Payload and returns a new Payload, potentially compressing, encoding, or even downloading the payload from a path. Then the converter still just operates on bytes.
cadence/_internal/workflow/statemachine/decision_state_machine.py
Outdated
Show resolved
Hide resolved
cadence/_internal/workflow/statemachine/decision_state_machine.py
Outdated
Show resolved
Hide resolved
d3576ce to
b7eef80
Compare
What changed?
workflow.statemachineWhy?
How did you test it?
Potential risks
Release notes
Documentation Changes