5a72e57b4580dca3eb0e33214dceea71f8cb9eb7
gperez2
  Wed Aug 30 23:27:06 2023 -0700
Correcting the file to be filtered_output.txt to get the errors and draft messages, refs #29319

diff --git src/utils/qa/hubCheckDraftEmails.py src/utils/qa/hubCheckDraftEmails.py
index bc0b692..564e50e 100755
--- src/utils/qa/hubCheckDraftEmails.py
+++ src/utils/qa/hubCheckDraftEmails.py
@@ -111,46 +111,46 @@
 would like to run the hubCheck utility on your own machine, you can download the tool from the
 utilities directory: 
 https://hgdownload.soe.ucsc.edu/downloads.html#utilities_downloads
 
 Please update your public track hub. If you have any questions, please let us know, and we will be
 happy to assist. Do not hesitate to let us know if we can help you resolve this situation, e.g. by
 updating the URL where the hub is hosted or possibly hosting the files on our servers.
 
 You can reach us at genome-www@soe.ucsc.edu.
 
 Thank you for your interest and contributions,
 The UCSC Genome Browser Group
 """
 
 # Gets the total lines number from the hubCheck output 
-totalLines=bash("wc -l /hive/users/qateam/hubCheckCronArchive/"+datetime.now().strftime("%Y-%m")+"/hubCheck_output | tr ' ' '\t' | cut -f1")
+totalLines=bash("wc -l /hive/users/qateam/hubCheckCronArchive/"+datetime.now().strftime("%Y-%m")+"/filtered_output.txt | tr ' ' '\t' | cut -f1")
 with open("/hive/users/qateam/hubCheckCronArchive/"+datetime.now().strftime("%Y-%m")+"/draftedMessages.txt", 'a') as f:
      f.write('##########################\n')
      # For loop that gets each hub.txt that has the error of missing description page
      for item in checkDuplicates(descPageMis):
              f.write('Send email to: '+getEmail(stringTerm(item))+'\n')
              f.write(emailIntro % item)
              # For loop that gets hubCheck output for each hub.txt that has the error of missing description page
-             for line in (bash("cat /hive/users/qateam/hubCheckCronArchive/"+datetime.now().strftime("%Y-%m")+"/hubCheck_output | grep -A "+stringTerm(totalLines)+" "+stringTerm(item))):
+             for line in (bash("cat /hive/users/qateam/hubCheckCronArchive/"+datetime.now().strftime("%Y-%m")+"/filtered_output.txt | grep -A "+stringTerm(totalLines)+" "+stringTerm(item))):
                 if '#' not in line:
                    f.write(line+'\n')
                 else: break
              f.write("\nWhen running hubCheck "+stringTerm(item)+'\n')
              f.write(endEmail)
              f.write('##########################\n')
      # For loop that gets each hub.txt that has the error of couldn't open 
      for item in checkDuplicates(couldNotOpen):
              f.write('Send email to: '+getEmail(stringTerm(item))+'\n')
              f.write(emailIntro % item)
              # For loop that gets hubCheck output for each hub.txt that has the error of couldn't open
-             for line in (bash("cat  /hive/users/qateam/hubCheckCronArchive/"+datetime.now().strftime("%Y-%m")+"/hubCheck_output | grep -A "+stringTerm(totalLines)+" "+stringTerm(item))):
+             for line in (bash("cat  /hive/users/qateam/hubCheckCronArchive/"+datetime.now().strftime("%Y-%m")+"/filtered_output.txt | grep -A "+stringTerm(totalLines)+" "+stringTerm(item))):
                 if '#' not in line:
                    f.write(line+'\n')
                 else: break
              f.write("\nWhen running hubCheck "+stringTerm(item)+'\n')
              f.write(endEmail)
              f.write('##########################\n')
 
 bash("cp /hive/users/qateam/hubCheckCronArchive/"+datetime.now().strftime("%Y-%m")+"/draftedMessages.txt /usr/local/apache/htdocs-genecats/qa/test-results/hubCheckCron/"+datetime.now().strftime("%Y-%m"))
 print("Check https://genecats.gi.ucsc.edu/qa/test-results/hubCheckCron/"+datetime.now().strftime("%Y-%m")+"/draftedMessages.txt to email hub authors about missing/broken public hub files")
 print("Archive of monthly raw data can be found here: /hive/users/qateam/hubCheckCronArchive/"+datetime.now().strftime("%Y-%m"))