-
Notifications
You must be signed in to change notification settings - Fork 18
Add Durable Entities support #63
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
|
||
|
||
class EntityLock: | ||
# Note: This should |
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.
Will clean this up
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'll merge - you can clean it up in a follow up PR.
return self | ||
|
||
def __exit__(self, exc_type, exc_val, exc_tb): | ||
self._context._exit_critical_section() |
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 can do this with a callback, where we just pass the _exit_critical_section method insetad of the whole OrchestrationContext, I just worry if it abstracts things a little too much. Feedback welcome
Add support for durable entities to this SDK
Also fixes a related bug: When the orchestration yields with CompleteOrchestration, we were discarding any pending actions - we need to keep these around for "side effects" actions like unlocking or signaling entities, which the user may expect to complete when the orchestration finishes.
Another issue with the side effects was discovered in the DTS backend, PR is linked in the test comments and the relevant test will need to be re-enabled once the fix is merged.
See the included documentation/samples/tests for usage guidelines.
Reviewers: Request special attention to file structures, naming, docs and tests
Discussion points: