mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-02 19:35:12 +02:00
Fix/save core hang (#201)
* Working around an exception class change in Python 3.11
This commit is contained in:
parent
a714221b22
commit
cf8c76b5c6
2 changed files with 9 additions and 3 deletions
|
|
@ -29,7 +29,9 @@ async def load_ge(running, queue, url):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
msg = await asyncio.wait_for(queue.get(), 1)
|
msg = await asyncio.wait_for(queue.get(), 1)
|
||||||
except TimeoutError:
|
except:
|
||||||
|
# Hopefully it's TimeoutError. Annoying to match since
|
||||||
|
# it changed in 3.11.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
msg = {
|
msg = {
|
||||||
|
|
@ -55,7 +57,9 @@ async def load_triples(running, queue, url):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
msg = await asyncio.wait_for(queue.get(), 1)
|
msg = await asyncio.wait_for(queue.get(), 1)
|
||||||
except TimeoutError:
|
except:
|
||||||
|
# Hopefully it's TimeoutError. Annoying to match since
|
||||||
|
# it changed in 3.11.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
msg ={
|
msg ={
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,9 @@ async def output(running, queue, path, format):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
msg = await asyncio.wait_for(queue.get(), 0.5)
|
msg = await asyncio.wait_for(queue.get(), 0.5)
|
||||||
except TimeoutError:
|
except:
|
||||||
|
# Hopefully it's TimeoutError. Annoying to match since
|
||||||
|
# it changed in 3.11.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if format == "msgpack":
|
if format == "msgpack":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue