Skip to content

Commit

Permalink
Make log_event threadsafe
Browse files Browse the repository at this point in the history
Closes #5552
  • Loading branch information
gjoseph92 committed Mar 15, 2022
1 parent 7a69b5e commit f3d442a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions distributed/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,12 +922,13 @@ def logs(self):
return self._deque_handler.deque

def log_event(self, topic, msg):
self.batched_stream.send(
self.loop.add_callback(
self.batched_stream.send,
{
"op": "log-event",
"topic": topic,
"msg": msg,
}
},
)

@property
Expand Down

0 comments on commit f3d442a

Please sign in to comment.