kaxil commented on a change in pull request #11373:
URL: https://github.com/apache/airflow/pull/11373#discussion_r502369239



##########
File path: airflow/task/task_runner/standard_task_runner.py
##########
@@ -105,9 +105,16 @@ def return_code(self, timeout=0):
         return self._rc
 
     def terminate(self):
+        self.log.debug("self.process: %r", self.process)
         if self.process is None:
             return
 
+        # Reap the child process - it may already be finished
+        self.log.debug("process.is_running(): %r, status(): %r", 
self.process.is_running(), self.process.status())
+        self._rc = os.waitpid(self.process.pid)
+        #self._rc = self.process.wait(timeout=0)

Review comment:
       ```suggestion
   ```

##########
File path: airflow/task/task_runner/standard_task_runner.py
##########
@@ -105,9 +105,16 @@ def return_code(self, timeout=0):
         return self._rc
 
     def terminate(self):
+        self.log.debug("self.process: %r", self.process)
         if self.process is None:
             return
 
+        # Reap the child process - it may already be finished
+        self.log.debug("process.is_running(): %r, status(): %r", 
self.process.is_running(), self.process.status())

Review comment:
       ```suggestion
       self.log.debug("process.is_running(): %r, status(): %r", 
self.process.is_running(),
                      self.process.status())
   ```

##########
File path: airflow/task/task_runner/standard_task_runner.py
##########
@@ -105,9 +105,16 @@ def return_code(self, timeout=0):
         return self._rc
 
     def terminate(self):
+        self.log.debug("self.process: %r", self.process)
         if self.process is None:
             return
 
+        # Reap the child process - it may already be finished
+        self.log.debug("process.is_running(): %r, status(): %r", 
self.process.is_running(), self.process.status())

Review comment:
       Will fix failing pylint static check
   
   ```
   airflow/task/task_runner/standard_task_runner.py:113:111: E501 line too long 
(114 > 110 characters)
   ```

##########
File path: airflow/task/task_runner/standard_task_runner.py
##########
@@ -105,9 +105,16 @@ def return_code(self, timeout=0):
         return self._rc
 
     def terminate(self):
+        self.log.debug("self.process: %r", self.process)
         if self.process is None:
             return
 
+        # Reap the child process - it may already be finished
+        self.log.debug("process.is_running(): %r, status(): %r", 
self.process.is_running(), self.process.status())

Review comment:
       Will fix failing flake8 static check
   
   ```
   airflow/task/task_runner/standard_task_runner.py:113:111: E501 line too long 
(114 > 110 characters)
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to