Skip to content

Commit

Permalink
Merge pull request #493 from tomoboy/session_msg_id_optimization
Browse files Browse the repository at this point in the history
Session.msg_id optimization
  • Loading branch information
minrk authored Nov 5, 2019
2 parents fb91900 + 8b60325 commit 650fd75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jupyter_client/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,12 @@ def clone(self):
new_session.digest_history.update(self.digest_history)
return new_session

message_count = 0
@property
def msg_id(self):
"""always return new uuid"""
return new_id()
message_number = self.message_count
self.message_count += 1
return '{}_{}'.format(self.session, message_number)

def _check_packers(self):
"""check packers for datetime support."""
Expand Down

0 comments on commit 650fd75

Please sign in to comment.