-
Notifications
You must be signed in to change notification settings - Fork 144
Workflow management python SDK #554
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
Changes from 7 commits
d3ac21a
575bba0
9acdf2c
3e23139
c4e9ef7
487e97f
0733570
26380ee
eb995b8
cd044d1
6fde40c
128a1fa
e074e58
2682d72
9361b30
49c78d7
0516400
f82bb8e
ffde1df
8d62488
28690f0
3015073
de23696
15938b4
19ea43f
40fe904
1be2447
ab2d201
a537862
75ae2bf
7a31c66
3c11d6c
f5c7796
325dedb
b8bca56
2f81812
3185586
2ff152e
347c0bf
2ebf20c
a8fa501
05194c8
b2aff5c
cc25bd7
1a8af1d
7598dd1
74dbc9f
bf69dea
0968b8e
94f915b
4886c9e
18bc883
9d8ec7f
49f960a
c64a091
f3207fc
2bfc44a
82b33e5
de33a9b
363a0df
ba2087a
a3fb750
135d3d7
a9be483
0e0203d
003e25b
b9865b3
0a0e94b
23ae6f7
9cc7e4a
30ab277
da401e8
8b7dec9
e1d050c
d7e9ebd
9f5f138
d08907e
722e5b3
57af017
40da262
4c985f0
a4769d5
cbed6a2
739f145
6932f97
9c6ae6f
efd8420
ff513f2
04be191
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 |
|---|---|---|
|
|
@@ -933,6 +933,64 @@ def extended_metadata(self) -> Dict[str, str]: | |
| return self._extended_metadata | ||
|
|
||
|
|
||
| # RRL TODO: Add properties and fix init | ||
|
Member
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. Fix or remove in this PR |
||
| class GetWorkflowResponse(): | ||
| '''The response of get_workflow operation.''' | ||
|
|
||
| def __init__( | ||
| self, | ||
| client: DaprGrpcClient, | ||
| instance_id: str, | ||
| workflow_name: str, | ||
| created_at: str, | ||
| last_updated_at: str, | ||
|
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. Both |
||
| runtime_status: str, | ||
|
RyanLettieri marked this conversation as resolved.
Outdated
|
||
| properties: Dict[str, str] = {}, | ||
| headers: MetadataTuple = (), | ||
| ): | ||
| """Initializes a GetWorkflowResponse. | ||
|
|
||
| Args: | ||
| client (DaprClient): a reference to the dapr client used for the GetWorkflow request. | ||
| instance_id (str): the instance ID assocated with this response. | ||
| workflow_name (str): the name of the workflow that was started. | ||
| created_at (str): the time at which the workflow started executing. | ||
| last_updated_at (str): the time at which the workflow was last updated. | ||
| runtime_status (str): the current runtime status of the workflow. | ||
| properties (Dict[str, str]): properties sent as a reponse by the workflow. | ||
| headers (Tuple, optional): the headers from Dapr gRPC response. | ||
| """ | ||
| super().__init__(headers) | ||
|
RyanLettieri marked this conversation as resolved.
Outdated
|
||
| self._client = client | ||
| self._instance_id = instance_id | ||
| self._workflow_name = workflow_name | ||
| self._created_at = created_at | ||
| self._last_updated_at = last_updated_at | ||
| self._runtime_status = runtime_status | ||
| self._properties = properties | ||
|
|
||
|
|
||
| class StartWorkflowResponse(): | ||
| '''The response of start_workflow operation.''' | ||
|
|
||
| def __init__( | ||
| self, | ||
| instance_id: str, | ||
| client: DaprGrpcClient, | ||
| headers: MetadataTuple = (), | ||
| ): | ||
| """Initializes a StartWorkflowResponse. | ||
|
|
||
| Args: | ||
| instance_id (str): the instance ID assocated with this response. | ||
| client (DaprClient): a reference to the dapr client used for the GetWorkflow request. | ||
| headers (Tuple, optional): the headers from Dapr gRPC response. | ||
| """ | ||
| super().__init__(headers) | ||
|
RyanLettieri marked this conversation as resolved.
Outdated
|
||
| self.instance_id = instance_id | ||
|
Comment on lines
+968
to
+980
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 think that a
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. @dataclass is another option, though I see that we already used |
||
| self._client = client | ||
|
|
||
|
|
||
| class RegisteredComponents(NamedTuple): | ||
| '''Describes a loaded Dapr component.''' | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.