054ce7806ed2e09aa1e24d1a126fedfb96bd1348
hiram
  Thu Sep 2 14:22:15 2021 -0700
show current botDelay millis after the ct loading penalty refs #28049

diff --git src/hg/lib/customTrack.c src/hg/lib/customTrack.c
index 291879d..259f21b 100644
--- src/hg/lib/customTrack.c
+++ src/hg/lib/customTrack.c
@@ -949,40 +949,40 @@
 /* merge new and old tracks */
 numAdded = slCount(newCts);
 /* add delay even if numAdded==0 because that can be when the loading
  * of the custom tracks failed.  The try is worth the penalty.
  */
 if (numAdded >= 0)
     {
     static int botCheckMult = 0;
     if (0 == botCheckMult)      // only on first time through here
 	{                       // default is 1 when not specified
 	char *val = cfgOptionDefault("customTracks.botCheckMult", "1");
         botCheckMult = sqlSigned(val);
         if (botCheckMult < 1)   // protect against negative value
 	    botCheckMult = 1;   // default is 1, no maximum check here
 	}
-    fprintf(stderr, "customTrack: new %d from %s\n", numAdded, customText);
     printSaveList = TRUE;
     /* add penalty in relation to number of tracks created
      * the default delayFraction here is 1, can be hg.conf specified
      * this call to hgBotDelayTimeFrac will merely add this penalty
      * to the existing delay time, there will be no sleeping here, that will
      * happen upon the next execution for the next CGI from that IP address.
      * Other CGIs besides hgTracks can be calling here.
      */
     botDelayMillis = hgBotDelayTimeFrac((double)((numAdded + 1)*botCheckMult));
+    fprintf(stderr, "customTrack: new %d from %s botDelay %d millis\n", numAdded, customText, botDelayMillis);
     }
 
 ctList = customTrackAddToList(ctList, newCts, &replacedCts, FALSE);
 for (ct = ctList; ct != NULL; ct = ct->next)
     if (trackDbSetting(ct->tdb, CT_UNPARSED))
         {
         ctRemoveFromSettings(ct, CT_UNPARSED);
         changedCt = TRUE;
         }
 if (newCts || removedCt || changedCt || ctConfigUpdate(ctFileName))
     {
     customTracksSaveCart(genomeDb, cart, ctList);
     // If all CTs have been removed then customTrackFileVar is also removed from cart, so optional:
     ctFileName = cartOptionalString(cart, customTrackFileVar(genomeDb));
     }