issues
search
temporalio
/
sdk-core
Core Temporal SDK that can be used as a base for language specific Temporal SDKs
MIT License
262
stars
70
forks
source link
Worker client replacement
#721
Closed
cretz
closed
4 months ago
cretz
commented
4 months ago
What was changed
Added
Worker::replace_client
. Notes:
Replacement unregisters itself with old client and re-registers with new client for eager workflow start
Uses lock of arc, so no currently operating poll on existing client will be interrupted (this has been tested)
This is as close as we can reasonably get to dynamic client endpoints without working through Tonic's connectivity
This is actually much cleaner for SDKs since they only really care about this for workers and can't interrupt anything running anyways
Had to change a few internal things but nothing drastic
Wrote test that starts two servers and swaps between (had to lower polling timeout on them)
Checklist
Closes #477
What was changed
Added
Worker::replace_client
. Notes:Checklist