ashb commented on issue #25297: URL: https://github.com/apache/airflow/issues/25297#issuecomment-1439817074
Generally running any serious amount of code inside a signal handler should be avoided -- it can cause lots of odd/hard to diagnose behavoiur. (The fact that we already call `task.on_kill()` from in there is probably not good either.) so it might fix it, but I'm worried about unpredictable side-effects with bigger failure callbacks. The way around that in general terms (not sure it applies here) is to have the signal handler set a flag (`self.terminate_requested=True` for example) and then have the "loop" (where ever it is) notice that and run the teardown code. However I'm not sure if that approach applies here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
