(self)
| 198 | @retry(wait = wait_random_exponential(multiplier = .5, max = 120), |
| 199 | stop = stop_after_attempt(30)) |
| 200 | def get_input_with_retry(self): |
| 201 | """ |
| 202 | """ |
| 203 | |
| 204 | if self.input: |
| 205 | return |
| 206 | |
| 207 | try: |
| 208 | logger.info(f"Getting input {self.input_id}") |
| 209 | self.input = Input.get_by_id( |
| 210 | session = self.session, |
| 211 | id = self.input_id) |
| 212 | |
| 213 | if self.input is None: |
| 214 | raise Exception |
| 215 | |
| 216 | except Exception as e: |
| 217 | logger.warn(f"Unable to fetch input ID: {self.input_id}") |
| 218 | self.attempt_reinsert_input() |
| 219 | |
| 220 | |
| 221 | @retry(wait = wait_random_exponential(multiplier = 2, max = 1024), |
no test coverage detected