6696987406845625c252a13b690e0c4d7d9e59fa max Thu Mar 26 06:48:48 2015 -0700 This is a go at libifing the CGI startup code. For all CGIs, we need to call a few basic setup funtions, like UDC config and CGI apoptosis. (For most CGIs also bottleneck). Instead of adding it to all of our 30+ CGIs, I changed the cart*Shell functions. I think most CGIs call at least one of these functions. This commit removes the existing copy/pasted code from a few CGIs and replaces it with one call. Adding this to the cart-setup means that (like before), UDC is setup even for small JSON calls and a process is spawned to watch the CGI and kill it ("Apoptosis"). Any comments on whether this should be implemented differently are appreciated. I have not added bottleneck to this function right now as apparently we're calling bottleneck only from some of our CGIs. diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index b14538c..e4710cf 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -5795,34 +5795,30 @@ * is more than 4k */ #if 0 state = cgiUrlString(); printf("State: %s\n", state->string); #endif getDbAndGenome(cart, &database, &organism, oldVars); protDbName = hPdbFromGdb(database); debugTmp = cartUsualString(cart, "hgDebug", "off"); if(sameString(debugTmp, "on")) hgDebug = TRUE; else hgDebug = FALSE; -int timeout = cartUsualInt(cart, "udcTimeout", 300); -if (udcCacheTimeout() < timeout) - udcSetCacheTimeout(timeout); - initTl(); char *configPageCall = cartCgiUsualString(cart, "hgTracksConfigPage", "notSet"); /* Do main display. */ if (cartUsualBoolean(cart, "hgt.trackImgOnly", FALSE)) { trackImgOnly = TRUE; ideogramToo = cartUsualBoolean(cart, "hgt.ideogramToo", FALSE); hideControls = TRUE; withNextItemArrows = FALSE; withNextExonArrows = FALSE; hgFindMatches = NULL; // XXXX necessary ??? }