Skip to content

Commit

Permalink
Fix/save core hang (#201)
Browse files Browse the repository at this point in the history
* Working around an exception class change in Python 3.11
  • Loading branch information
cybermaggedon authored Dec 9, 2024
1 parent a714221 commit cf8c76b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions trustgraph-cli/scripts/tg-load-kg-core
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ async def load_ge(running, queue, url):

try:
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

msg = {
Expand All @@ -55,7 +57,9 @@ async def load_triples(running, queue, url):

try:
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

msg ={
Expand Down
4 changes: 3 additions & 1 deletion trustgraph-cli/scripts/tg-save-kg-core
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ async def output(running, queue, path, format):

try:
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

if format == "msgpack":
Expand Down

0 comments on commit cf8c76b

Please sign in to comment.