bc60ecbf3126d1c8502d28b45dde545bf8467d8b hiram Fri Sep 3 15:14:40 2021 -0700 not a good idea to add delay for zero custom tracks loaded, something in hgc is calling this repeatedly for no custom tracks refs #28049 diff --git src/hg/lib/customTrack.c src/hg/lib/customTrack.c index 259f21b..8bfc2ba 100644 --- src/hg/lib/customTrack.c +++ src/hg/lib/customTrack.c @@ -939,31 +939,31 @@ changedCt = TRUE; } } break; } } } cartRemove(cart, CT_SELECTED_TABLE_VAR); } /* 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) +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 } 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.