| 176 | log.debug("Executor process: current processes", ps_fax=ps_fax) |
| 177 | |
| 178 | def wait_for(self, wait_for): |
| 179 | while self.check_timeout(): |
| 180 | log.debug( |
| 181 | "Executor process: waiting", |
| 182 | command=self.command, |
| 183 | until=self._endtime, |
| 184 | now=time.time(), |
| 185 | ) |
| 186 | if wait_for(): |
| 187 | log.debug( |
| 188 | "Executor process: waiting ended", |
| 189 | command=self.command, |
| 190 | until=self._endtime, |
| 191 | now=time.time(), |
| 192 | ) |
| 193 | return self |
| 194 | time.sleep(self._sleep) |
| 195 | |
| 196 | self.kill() |
| 197 | raise TimeoutExpired(self, timeout=self._timeout) |
| 198 | |
| 199 | def running(self) -> bool: |
| 200 | """Include pre_start_check in running, so stop will wait for the underlying listener""" |