00004668c7992ffd02d7734084f0a3afa2983300 gperez2 Mon Oct 14 23:32:41 2024 -0700 Removing lines and print statements that were used for troubleshooting, refs #34575 diff --git src/utils/qa/checkSessionsFromRR.py src/utils/qa/checkSessionsFromRR.py index 9d95e80..a88d765 100755 --- src/utils/qa/checkSessionsFromRR.py +++ src/utils/qa/checkSessionsFromRR.py @@ -140,35 +140,33 @@ if check_hgTracks in checkLoad: if check_error in checkLoad: #checks if there is an error when session is loaded if check_warning in checkLoad: #checks if the error is a warning when session is loaded check3='loads' else: #If session contains the error string to check, add error to list error_list.append('error') check2='loads' #Pass if session load error is Couldn't connect to database hub error (hub id issue) elif hubid_error in checkLoad: pass #Pass if session load error is can not find any trackDb tables for hub_ ((hub id issue)) elif hubid_error_dev in checkLoad: pass # Check for the hubCollection error by matching the exact string pattern elif re.search(re.escape(hubCollection_error), checkLoad): - print("Collections error") pass # Check for buffer overflow error by matching the exact string pattern elif re.search(re.escape(buffer_error), checkLoad): - print("Buffer error") pass else: #If session does not contains strings to check, add error to list error_list.append('error') except subprocess.CalledProcessError as e: #If session fails to curl, add error to list error_list.append('error') #If an error is present in the error list, save the session URL to variable if 'error' in error_list: sessionLoad=session else: #If no error is present in the error list, set variable that session loaded sessionLoad='loads' session_dir=session.split('genecats.gi.ucsc.edu')[1] session_path=myDir+session_dir return sessionLoad @@ -177,36 +175,33 @@ """Creates a text file that appends crash sessions""" failed_session=open(url_txt, 'a') failed_session.write(str(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))+'\t'+str(session)+'\n') failed_session.close() return session def output_if_file_exists(file_path): """Outputs if text file was created for crash sessions""" if os.path.exists(file_path): print("This cronjob outputs sessions that crash on hgwbeta or hgwdev. The session URLs have '#' in ...session_settings_#.txt which is the random number session tested") with open(file_path, 'r') as file: print() print(file.read()) print("\nErrors that output 'hui::wiggleScaleStringToEnum() - Unknown option' can be ignored.") -#year=datetime.now().strftime("%Y-%m-"+"01") server='https://genecats.gi.ucsc.edu/qa/qaCrons' -#Saves the montly hgcentral session dump to a varaiable -#monthly_hgcentral_dump="/usr/local/apache/htdocs-genecats/qa/test-results/hgcentral/"+year+"/rr.namedSessionDb" num_lines=10000 # Number of random lines to select # Get the current date and format it as 'YYYY-MM-01' current_year_month = datetime.now().strftime("%Y-%m-"+"01") # Construct the path for the current month's file monthly_hgcentral_dump = f"/usr/local/apache/htdocs-genecats/qa/test-results/hgcentral/{current_year_month}/rr.namedSessionDb" # Check if the file exists for the current month if not os.path.exists(monthly_hgcentral_dump): # If the file doesn't exist, calculate the previous month current_year = int(datetime.now().strftime("%Y")) current_month = int(datetime.now().strftime("%m"))