a47f57d008f2db28a7b140ece87cbcfb8e8a5c0c hiram Thu Sep 12 14:18:19 2019 -0700 expand earlyBotCheck to manage two types of outputs, recognize defaults, and adding hgGateway to the game refs #23217 diff --git src/hg/lib/customTrack.c src/hg/lib/customTrack.c index 6c0b6b7..6b194f1 100644 --- src/hg/lib/customTrack.c +++ src/hg/lib/customTrack.c @@ -940,34 +940,36 @@ } } cartRemove(cart, CT_SELECTED_TABLE_VAR); } /* merge new and old tracks */ numAdded = slCount(newCts); if (numAdded) { fprintf(stderr, "customTrack: new %d from %s\n", numAdded, customText); printSaveList = TRUE; /* add penalty in relation to number of tracks created * the delayFraction here is 0.25 as it is in hgTracks * the enteredMainTime is 0 since this is not important here * the warnMs and exitMs are set at 1,000,000 since we do *not* want - * any exit here, and the return code issueBotWarning is ignored - * this is merely to accumulate penalty time. + * any exit or warning here, and the return code issueBotWarning is ignored + * this is merely to accumulate penalty time. The name "hgTracks" here + * is unimportant, it is not going to be used. Other CGIs besides hgTracks + * will be calling here. */ - (void) earlyBotCheck(0, "hgTracks", (double)(numAdded + 1) * 0.25, 1000000, 1000000); + (void) earlyBotCheck(0, "hgTracks", (double)(numAdded + 1) * 0.25, 1000000, 1000000, "html"); } 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)); }