8aa6962feea3d82de4b697351040fadd50da2754 hiram Thu Aug 15 15:16:44 2019 -0700 begin to call bottleneck server at the very beginning of hgTracks and ready for other CGIs with library function refs #23217 diff --git src/hg/inc/botDelay.h src/hg/inc/botDelay.h index c8412bc..b2eea4f 100644 --- src/hg/inc/botDelay.h +++ src/hg/inc/botDelay.h @@ -22,16 +22,23 @@ void hgBotDelayFrac(double fraction); /* Like hgBotDelay, but imposes a fraction of the standard access penalty */ void hgBotDelayNoWarn(); /* High level bot delay call without warning - for use with non-webpage output */ void hgBotDelayNoWarnFrac(double fraction); /* Like hgBotDelayNoWarn, but imposes a fraction of the standard access penalty */ int hgBotDelayTime(); /* Get suggested delay time from cgi using the standard penalty. */ int hgBotDelayTimeFrac(double fraction); /* Get suggested delay time from cgi using the specified fraction of the standard penalty. */ - +extern int botDelayMillis; + +boolean earlyBotCheck(long enteredMainTime, char *cgiName, double delayFrac, int warningMs, int hogExitMs); +/* similar to botDelayCgi but for use before the CGI has started any + * output or setup the cart of done any MySQL operations. The boolean + * return is used later in the CGI after it has done all its setups and + * started output so it can issue the warning. + */