Hi,
I am getting errors with wf cancelation in case the code has breaking changes, for example, I refactored a function and the worker can’t pick up the workflow logic and cannot cancel it.
Shame on me, I am using `import passed through in the code.
I was thinking about a workaround to be like this:
async def cancel_workflow(handle):
try:
await handle.cancel()
except Exception as e:
print(f"Error cancelling workflow: {e}")
await handle.terminate()
Also, I can add a health check if a wf was not cancelled in X seconds → terminate it.
What would be the best approach considering my situation?