Returns the length of the match queue.
(conn)
| 47 | |
| 48 | |
| 49 | def get_queue_length(conn) -> int: |
| 50 | """ |
| 51 | Returns the length of the match queue. |
| 52 | """ |
| 53 | cur = conn.cursor() |
| 54 | |
| 55 | query = 'SELECT COUNT(*) FROM {} WHERE \ |
| 56 | status=\'queued\' or status=\'running\';'.format(TABLE_NAME) |
| 57 | cur.execute(query) |
| 58 | queue_length = cur.fetchone()[0] |
| 59 | cur.close() |
| 60 | |
| 61 | return queue_length |
| 62 | |
| 63 | |
| 64 | def get_tournament_maps(conn, tag=None) -> List[Map]: |
no test coverage detected