Skip to content

Commit

Permalink
Properly error in multiprocessing for sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed Sep 22, 2022
1 parent 5f3d85d commit c49e901
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/maggma/cli/multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,10 @@ async def multi(builder, num_processes, no_bars=False, socket=None):
)

if socket:
await socket.send("PING")
await socket.send_string("PING")
message = await socket.recv()
if message.decode("utf-8") != "PONG":
socket.close()
raise RuntimeError("Stopping work as main node is not responding.")

back_pressure_relief = back_pressured_get.release(processed_items)
Expand Down

0 comments on commit c49e901

Please sign in to comment.