Matthew-DWM commented on code in PR #9364:
URL: https://github.com/apache/texera/pull/9364#discussion_r4555855699


##########
amber/src/main/scala/org/apache/texera/amber/engine/architecture/pythonworker/PythonWorkflowWorker.scala:
##########
@@ -187,10 +230,12 @@ class PythonWorkflowWorker(
   }
 
   override def postStop(): Unit = {
+    stopping = true
     super.postStop()
     try {
-      // try to send shutdown command so that it can gracefully shutdown
-      pythonProxyClient.close()
+      // try to send shutdown command so that it can gracefully shutdown. 
Without a port the
+      // client's constructor would wait forever, and there is no Python side 
to shut down.
+      if (portNumberPromise.isDefined) pythonProxyClient.close()

Review Comment:
   Done: `postStop` only destroys the process if one was started.



-- 
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]

Reply via email to