sdk-python
sdk-python copied to clipboard
Include stack trace on deadlock detection exception
trafficstars
Use the workflow tid to capture the workflow thread's frame at the time of deadlock.
Added current_thread_id: Optional[int] and get_worker_ident(self) -> Optional[int] to interfaces/implementations.
Currently I only set tid in _run_once for the standard implementation, if it's needed elsewhere please let me know. (This is mainly why it's marked as a draft)
Also, readability around the code in _workflow.py is (imo) suboptimal so I'd appreciate feedback/ideas on that.