4ff52b737cc301bc1f66518cdc6336c8b976bb16 hiram Mon Sep 6 09:31:38 2021 -0700 do not penalize for each custom track, just one penalty per submissiong refs #28049 diff --git src/hg/lib/customTrack.c src/hg/lib/customTrack.c index 8bfc2ba..43ba822 100644 --- src/hg/lib/customTrack.c +++ src/hg/lib/customTrack.c @@ -957,31 +957,34 @@ 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. * Other CGIs besides hgTracks can be calling here. */ - botDelayMillis = hgBotDelayTimeFrac((double)((numAdded + 1)*botCheckMult)); +// multiply by numAdded might be too much for ordinary users who are loading +// lots of tracks. For now, only use the number in from botCheckMult. +// botDelayMillis = hgBotDelayTimeFrac((double)((numAdded + 1)*botCheckMult)); + botDelayMillis = hgBotDelayTimeFrac((double)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));