-
Notifications
You must be signed in to change notification settings - Fork 142
Nexus task cancellation #1204
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
Nexus task cancellation #1204
Changes from 6 commits
2972d9b
134b473
883ba60
fa971e0
5a5d031
4956b3e
8fbe367
d28c5a7
ad7da32
66ab01a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5417,6 +5417,22 @@ async def start_operation( | |
| headers: Optional[Mapping[str, str]] = None, | ||
| ) -> NexusOperationHandle[OutputT]: ... | ||
|
|
||
| # Overload for operation_handler | ||
| @overload | ||
| @abstractmethod | ||
| async def start_operation( | ||
| self, | ||
| operation: Callable[ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not entirely sure about this. At the workflow level, we should be seeing the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see what you mean. Removing this and updating the test to define the service and use that.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, let's move on with this. We'll review pertinence of all overloads in another issue. |
||
| [ServiceHandlerT], nexusrpc.handler.OperationHandler[InputT, OutputT] | ||
| ], | ||
| input: InputT, | ||
| *, | ||
| output_type: Optional[Type[OutputT]] = None, | ||
| schedule_to_close_timeout: Optional[timedelta] = None, | ||
| cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, | ||
| headers: Optional[Mapping[str, str]] = None, | ||
| ) -> NexusOperationHandle[OutputT]: ... | ||
|
|
||
| @abstractmethod | ||
| async def start_operation( | ||
| self, | ||
|
|
@@ -5527,6 +5543,23 @@ async def execute_operation( | |
| headers: Optional[Mapping[str, str]] = None, | ||
| ) -> OutputT: ... | ||
|
|
||
| # Overload for operation_handler | ||
| @overload | ||
| @abstractmethod | ||
| async def execute_operation( | ||
| self, | ||
| operation: Callable[ | ||
| [ServiceT], | ||
| nexusrpc.handler.OperationHandler[InputT, OutputT], | ||
| ], | ||
| input: InputT, | ||
| *, | ||
| output_type: Optional[Type[OutputT]] = None, | ||
| schedule_to_close_timeout: Optional[timedelta] = None, | ||
| cancellation_type: NexusOperationCancellationType = NexusOperationCancellationType.WAIT_COMPLETED, | ||
| headers: Optional[Mapping[str, str]] = None, | ||
| ) -> OutputT: ... | ||
|
|
||
| @abstractmethod | ||
| async def execute_operation( | ||
| self, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.