-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add workflow.instance() API for obtaining current workflow instance #739
base: main
Are you sure you want to change the base?
Conversation
2485f19
to
5d752a6
Compare
|
||
|
||
class WorkflowInstanceAccessInboundInterceptor(WorkflowInboundInterceptor): | ||
async def execute_workflow(self, input: ExecuteWorkflowInput) -> int: |
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.
Can you confirm that the workflow.instance()
is non-None
when this interceptor starts? I read through the code and I suspect it is, just wanted to confirm.
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.
Does this do what you're suggesting? 0b8a0bd
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.
Yes, thanks!
What about the activity instance? Will that be a separate issue? |
For activity instance, it's not needed in Python because we don't ever create the instance, only the user does. And we only need to provide the instance in cases where we create it and control the lifetime. |
5d752a6
to
306b050
Compare
306b050
to
49be3d1
Compare
Fixes #720