- fix global variable access

This commit is contained in:
Dmytro Bogovych 2023-09-11 12:21:33 +03:00
parent 7d21de2dd0
commit cc5cec6cd2
1 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,7 @@ TRACE_TOTAL_TIMEOUT = 30
# a webpage is mostly I/O bound, it's not going to be significant.
def trace_function(frame, event, arg):
global TRACE_START_TIME
if time.time() - TRACE_START_TIME > TRACE_TOTAL_TIMEOUT:
raise Exception('Timed out!') # Use whatever exception you consider appropriate.
@ -114,6 +115,7 @@ class QualtestBackend:
def upload_audio(self, probe_id, path_recorded: Path):
global TRACE_START_TIME
result = False
# Log about upload attempt