70b873ace3ffca0850aa635f7fc43c71cc7b09d5
hiram
  Fri May 1 14:50:19 2026 -0700
further silent the cron outputs and add a status indicator to the watch.cgi page refs #31811

diff --git src/hg/utils/otto/userRequests/ottoRequestAlign.sh src/hg/utils/otto/userRequests/ottoRequestAlign.sh
index 98b8f1a1a2e..7501624ad8d 100755
--- src/hg/utils/otto/userRequests/ottoRequestAlign.sh
+++ src/hg/utils/otto/userRequests/ottoRequestAlign.sh
@@ -142,94 +142,94 @@
   printf "ERROR: no ottoRequest row found for id=%s AND status = 1\n" "${requestId}" 1>&2
   /cluster/bin/x86_64/hgsql -e "SELECT fromDb,toDb,status from ottoRequest WHERE id=${requestId};" hgcentraltest 1>&2
   exit 255
 fi
 
 export fromDb=$(printf "%s" "${ottoResult}" | cut -f1)
 export toDb=$(printf "%s" "${ottoResult}" | cut -f2)
 
 if [ -z "${fromDb}" -o -z "${toDb}" ]; then
   printf "ERROR: empty fromDb or toDb for ottoRequest id=%s\n" "${requestId}" 1>&2
   printf "  got: fromDb='%s' toDb='%s'\n" "${fromDb}" "${toDb}" 1>&2
   setErrorStatus ${requestId}
   exit 255
 fi
 
-printf "# ottoRequest id=%s: fromDb='%s' toDb='%s'\n" \
-  "${requestId}" "${fromDb}" "${toDb}" 1>&2
+# printf "# ottoRequest id=%s: fromDb='%s' toDb='%s'\n" \
+#   "${requestId}" "${fromDb}" "${toDb}" 1>&2
 
 ############################################################################
 # step 2: look up both identifiers -- GenArk accession or UCSC db name
 ############################################################################
 case "${fromDb}" in
   GC[AF]_*)
     genarkLookup "${fromDb}" || exit 255
     export fromId="${_acc}_${_asmName}"
     export fromClade="${_clade}"
     ;;
   *)
     dbDbCladeLookup "${fromDb}" || exit 255
     export fromId="${fromDb}"
     export fromClade="${_clade}"
     ;;
 esac
 
 case "${toDb}" in
   GC[AF]_*)
     genarkLookup "${toDb}" || exit 255
     export toId="${_acc}_${_asmName}"
     export toClade="${_clade}"
     ;;
   *)
     dbDbCladeLookup "${toDb}" || exit 255
     export toId="${toDb}"
     export toClade="${_clade}"
     ;;
 esac
 
-printf "# from: %s  clade=%s\n" "${fromId}" "${fromClade}" 1>&2
-printf "#   to: %s  clade=%s\n" "${toId}" "${toClade}" 1>&2
+# printf "# from: %s  clade=%s\n" "${fromId}" "${fromClade}" 1>&2
+# printf "#   to: %s  clade=%s\n" "${toId}" "${toClade}" 1>&2
 
 ############################################################################
 # step 3: determine N50 for each to decide target vs. query
 ############################################################################
 
 export from2bit=$(twoBitPath "${fromDb}")
 export to2bit=$(twoBitPath "${toDb}")
 
 if [ ! -s "${from2bit}" ]; then
   printf "ERROR: 2bit file not found: %s\n" "${from2bit}" 1>&2
   setErrorStatus ${requestId}
   exit 255
 fi
 
 if [ ! -s "${to2bit}" ]; then
   printf "ERROR: 2bit file not found: %s\n" "${to2bit}" 1>&2
   setErrorStatus ${requestId}
   exit 255
 fi
 
 export fromN50=$(asmN50 "${from2bit}")
 export toN50=$(asmN50 "${to2bit}")
 
-printf "# from N50: %s (%s)\n" "${fromN50}" "${fromDb}" 1>&2
-printf "#   to N50: %s (%s)\n" "${toN50}" "${toDb}" 1>&2
+# printf "# from N50: %s (%s)\n" "${fromN50}" "${fromDb}" 1>&2
+# printf "#   to N50: %s (%s)\n" "${toN50}" "${toDb}" 1>&2
 
 if [ -n "${fromN50}" -a -n "${toN50}" ]; then
   if [ "${toN50}" -gt "${fromN50}" ]; then
-    printf "# swapping: %s (N50=%s) becomes target over %s (N50=%s)\n" \
-      "${toId}" "${toN50}" "${fromId}" "${fromN50}" 1>&2
+#    printf "# swapping: %s (N50=%s) becomes target over %s (N50=%s)\n" \
+#      "${toId}" "${toN50}" "${fromId}" "${fromN50}" 1>&2
     tmpId="${fromId}"; export fromId="${toId}"; export toId="${tmpId}"
     tmpClade="${fromClade}"; export fromClade="${toClade}"; export toClade="${tmpClade}"
   fi
 else
   printf "WARNING: could not determine N50, keeping original target/query order\n" 1>&2
 fi
 
 ############################################################################
 # step 4: compute buildDir and update ottoRequest table
 ############################################################################
 
 # derive accession ID and Query label the same way kegAlignLastz.sh does
 export tAccId=$(printf "%s" "${fromId}" | cut -d'_' -f1-2)
 export qAccId=$(printf "%s" "${toId}" | cut -d'_' -f1-2)
 export Query="${qAccId^}"
@@ -243,39 +243,39 @@
   GC[AF]_*)
     gcX=$(printf "%s" "${fromId}" | cut -c1-3)
     d0=$(printf "%s" "${fromId}" | cut -c5-7)
     d1=$(printf "%s" "${fromId}" | cut -c8-10)
     d2=$(printf "%s" "${fromId}" | cut -c11-13)
     tGcPath="${gcX}/${d0}/${d1}/${d2}"
     buildDir="/hive/data/genomes/asmHubs/allBuild/${tGcPath}/${fromId}/trackData/lastz${Query}.${DS}"
     targetExists="/hive/data/genomes/asmHubs/allBuild/${tGcPath}/${fromId}/trackData"
     ;;
 esac
 
 # reuse existing build directory if one is already in progress
 working=$(ls -d ${targetExists}/lastz${Query}.* 2> /dev/null | wc -l || true)
 if [ "${working}" -gt 0 ]; then
   buildDir=$(ls -d ${targetExists}/lastz${Query}.* | tail -1)
-  printf "# existing buildDir: %s\n" "${buildDir}" 1>&2
+# printf "# existing buildDir: %s\n" "${buildDir}" 1>&2
 fi
 
 mkdir -p  "${buildDir}"
 
-printf "# buildDir: %s\n" "${buildDir}" 1>&2
+# printf "# buildDir: %s\n" "${buildDir}" 1>&2
 
 # store buildDir in ottoRequest table for workflowMonitor.sh
 /cluster/bin/x86_64/hgsql -N -e \
   "UPDATE ottoRequest SET buildDir='${buildDir}', status=2 WHERE id=${requestId};" \
   hgcentraltest
 
 ############################################################################
 # step 5: map clades and build the kegAlignLastz.sh command
 ############################################################################
 export fromCladeArg=$(cladeMap "${fromClade}")
 export toCladeArg=$(cladeMap "${toClade}")
 
 export cmd="${scriptDir}/kegAlignLastz.sh ${fromId} ${toId} ${fromCladeArg} ${toCladeArg}"
 
-printf "# launching: %s\n" "${cmd}" 1>&2
+# printf "# launching: %s\n" "${cmd}" 1>&2
 nohup ${cmd} > "${buildDir}/kegAlign.log" 2>&1 < /dev/null &
-printf "# launched pid %s, log=%s/kegAlign.log\n" "$!" "${buildDir}" 1>&2
+# printf "# launched pid %s, log=%s/kegAlign.log\n" "$!" "${buildDir}" 1>&2
 exit 0