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/hgc/vcfClick.c src/hg/hgc/vcfClick.c index c1d23ac..bb65d7a 100644 --- src/hg/hgc/vcfClick.c +++ src/hg/hgc/vcfClick.c @@ -438,33 +438,30 @@ for (rec = vcff->records; rec != NULL; rec = rec->next) if (rec->chromStart == start && rec->chromEnd == end) // in pgSnp mode, don't get name vcfRecordDetails(tdb, rec); } else printf("Sorry, unable to open %s<BR>\n", fileOrUrl); printTrackHtml(tdb); } #ifdef USE_TABIX void doVcfTabixDetails(struct trackDb *tdb, char *item) /* Show details of an alignment from a VCF file compressed and indexed by tabix. */ { -knetUdcInstall(); -if (udcCacheTimeout() < 300) - udcSetCacheTimeout(300); struct sqlConnection *conn = hAllocConnTrack(database, tdb); char *fileOrUrl = bbiNameFromSettingOrTableChrom(tdb, conn, tdb->table, seqName); hFreeConn(&conn); doVcfDetailsCore(tdb, fileOrUrl, TRUE); } #endif // no USE_TABIX void doVcfDetails(struct trackDb *tdb, char *item) /* Show details of an alignment from an uncompressed VCF file. */ { struct customTrack *ct = lookupCt(tdb->track); struct sqlConnection *conn = NULL;