Checks every 10 seconds until the queue is empty. This method is used to ensure that rankings are final after we recalculate them.
(conn)
| 181 | |
| 182 | |
| 183 | def wait_for_empty_queue(conn) -> None: |
| 184 | """ |
| 185 | Checks every 10 seconds until the queue is empty. This method is used to |
| 186 | ensure that rankings are final after we recalculate them. |
| 187 | """ |
| 188 | queue_length = get_queue_length(conn) |
| 189 | while queue_length != 0: |
| 190 | time.sleep(10) |
| 191 | logging.info('Waiting for the queue to empty: {} left...' |
| 192 | .format(queue_length)) |
| 193 | queue_length = get_queue_length(conn) |
| 194 | logging.debug('Queue is empty.') |
| 195 | |
| 196 | |
| 197 | def pad_teams_power_of_two(teams: List[Team]) -> List[Team]: |
no test coverage detected