uber-go / cadence-client

Framework for authoring workflows and activities running on top of the Cadence orchestration engine.
https://cadenceworkflow.io
MIT License
345 stars 131 forks source link

Break long poll loop early when context remaining timeout is too low #1123

Open vytautas-karpavicius opened 3 years ago

vytautas-karpavicius commented 3 years ago

What changed? Stop long poll on the client side when too little time is left on the context.

Why? To prevent unnecessary call to the server will would timeout anyway.

Relate Server PR: https://github.com/uber/cadence/pull/4425

How did you test it? Locally.

Potential risks

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 045dc6fd-ee25-4797-9592-38002509929e


Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/internal_workflow_client.go 5 7 71.43%
<!-- Total: 5 7 71.43% -->
Totals Coverage Status
Change from base Build 824b8973-99ad-4f10-9ea7-7b04277109c0: 0.02%
Covered Lines: 12174
Relevant Lines: 17017

💛 - Coveralls