(self, future: Future)
| 1625 | self._poll_queue.put((at, future)) |
| 1626 | |
| 1627 | def _poll_using_long_polling(self, future: Future) -> None: |
| 1628 | # we use problem submit time to prioritize polling of jobs submitted earlier |
| 1629 | created_at = datetime_to_timestamp(future.time_created) |
| 1630 | |
| 1631 | # don't enqueue for next poll if polling_timeout is exceeded by then |
| 1632 | future_age = time.time() - created_at |
| 1633 | if self.config.polling_timeout is not None and future_age > self.config.polling_timeout: |
| 1634 | logger.debug("Polling timeout exceeded before next poll: %.2f sec > %.2f sec, aborting polling!", |
| 1635 | future_age, self.config.polling_timeout) |
| 1636 | raise PollingTimeout |
| 1637 | |
| 1638 | # use the same priority queue as for backoff polling |
| 1639 | self._poll_queue.put((created_at, future)) |
| 1640 | |
| 1641 | def _do_poll_problems(self): |
| 1642 | """Poll the server for the status of a set of problems. |
no test coverage detected