-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Use async db calls in WorkflowTrigger #38689
Use async db calls in WorkflowTrigger #38689
Conversation
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.
Looks good, LGTM
I don’t think we can just remove TaskStateTrigger, but let’s deprecate it for future removal. It would also be a good idea to implement an version of |
I'm working on a draft AIP to add this support, I tested it a few months ago and the results were promising: #36504 |
Also some async features are only available in sqlalchemy 2.0, so maybe we need to focus on this migration first. |
I have deprecated |
* Use async db calls in WorkflowTrigger * address PR comments * deprecate TaskStateTrigger with proper category (cherry picked from commit e6eec0c)
This closes: #38672
I opted to slightly extend some existing unit tests rather than write mostly identical new ones. If the
@sync_to_async
decorator and theawait
s beforeself._get_count
are removed the tests will fail because the trigger and dummy tasks are executed sequentially.Should I also remove
TaskStateTrigger
in this PR? It is not used anymore outside of tests.