MCPcopy Create free account
hub / github.com/crate/crate / wait_for_function

Function wait_for_function

blackbox/test_docs.py:166–181  ·  view source on GitHub ↗
(signature)

Source from the content-addressed store, hash-verified

164
165
166def 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

Callers

nothing calls this directly

Calls 2

cursorMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected