tetst:check stream task status in common.py

This commit is contained in:
chenhaoran 2024-08-29 15:59:02 +08:00
parent 8b3aca49e3
commit a149a18d39
1 changed files with 7 additions and 2 deletions

View File

@ -997,8 +997,13 @@ class TDCom:
second_number = int(match.group(3)) # The second number inside the brackets second_number = int(match.group(3)) # The second number inside the brackets
# Compare the extracted numbers and return the result # Compare the extracted numbers and return the result
if first_number >= second_number-5 and first_number <= second_number: if second_number >=5 :
return True if first_number >= second_number-5 and first_number <= second_number:
return True
elif second_number < 5:
if first_number >= second_number-1 and first_number <= second_number:
return True
# If no match was found, or the pattern does not match the expected format, return False # If no match was found, or the pattern does not match the expected format, return False
return False return False