(signature)
| 164 | |
| 165 | |
| 166 | def wait_for_function(signature): |
| 167 | with connect(crate.http_url) as conn: |
| 168 | c = conn.cursor() |
| 169 | wait = 0.0 |
| 170 | |
| 171 | while True: |
| 172 | try: |
| 173 | c.execute('SELECT ' + signature) |
| 174 | except Exception as e: |
| 175 | wait += 0.1 |
| 176 | if wait >= 2.0: |
| 177 | raise e |
| 178 | else: |
| 179 | time.sleep(0.1) |
| 180 | else: |
| 181 | break |
| 182 | |
| 183 | |
| 184 |