Skip to content

Commit

Permalink
Make log_event threadsafe (#5946)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjoseph92 authored Mar 16, 2022
1 parent 6083385 commit 3492ef1
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 3492ef1

Please sign in to comment.