Commit 3de02fb
authored
fix(worker): event loop should run until yield (#53)
<!-- Describe what has changed in this PR -->
**What changed?**
* added a new method in DeterministicEventLoop to run workflow
coroutines until no callbacks available
<!-- Tell your future self why have you made these changes -->
**Why?**
Existing EventLoop API doesn't have functionality of waiting until
callback queue is empty. This is required for cadence workflows to
generate all decision outcomes.
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
Unit Test
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**
<!-- Is it notable for release? e.g. schema updates, configuration or
data migration required? If so, please mention it, and also update
CHANGELOG.md -->
**Release notes**
<!-- Is there any documentation updates should be made for config,
https://cadenceworkflow.io/docs/operation-guide/setup/ ? If so, please
open an PR in https://github.com/cadence-workflow/cadence-docs -->
**Documentation Changes**
---------
Signed-off-by: Shijie Sheng <liouvetren@gmail.com>1 parent 273f7d0 commit 3de02fb
File tree
3 files changed
+25
-4
lines changed- cadence/_internal/workflow
- tests/cadence/_internal/workflow
3 files changed
+25
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 228 | + | |
232 | 229 | | |
233 | 230 | | |
234 | 231 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
0 commit comments