in images/airflow/2.9.2/python/mwaa/subprocess/subprocess.py [0:0]
def execution_loop_iter(self):
"""
Execute a single iteration of the execution loop.
The execution loop is a loop that continuously monitors the status of the
process. This method executes a single iteration and exits, expecting the
caller to repeatedly call this method until it returns
`False`, meaning that the process has exited.
:return: True if the process is still running.
"""
if not self.process:
# Process is not running anymore.
return False
if self.process_status == ProcessStatus.FINISHED:
# The process has finished.
# just return False so the caller stop looping.
return False
self.process_status = self._get_subprocess_status(self.process)
if self.process_status == ProcessStatus.FINISHED:
# We are done; call shutdown to ensure that we free all resources.
self.shutdown()
elif self.process_status == ProcessStatus.RUNNING and self.conditions:
# The process is still running, so we need to check conditions.
failed_conditions = self._check_process_conditions()
if failed_conditions:
module_logger.warning(
f"""