Skip recorder commit if there is nothing to do (#49614)

pull/49655/head
J. Nick Koston 2021-04-25 00:05:49 -10:00 committed by GitHub
parent 3e3cd0981d
commit 376b787e4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -666,6 +666,9 @@ class Recorder(threading.Thread):
return False
def _commit_event_session_or_retry(self):
"""Commit the event session if there is work to do."""
if not self.event_session.new and not self.event_session.dirty:
return
tries = 1
while tries <= self.db_max_retries:
try: