7d7e2185f8a8ef113972a038534987d49b443d32 hiram Fri Aug 16 13:10:00 2019 -0700 now adding penalty in relation to number of custom tracks added refs #23217 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 69a507e..2794a04 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -6340,30 +6340,37 @@ tg->customTrack = TRUE;// Explicitly declare this a custom track for flatTrack ordering freez(&typeDupe); return tg; } char *getPositionFromCustomTracks() /* Parses custom track data to get the position variable * return - The first chromosome position variable found in the * custom track data. */ { char *pos = NULL; struct slName *bl = NULL; ctList = customTracksParseCart(database, cart, &browserLines, &ctFileName); +if (slCount(ctList) > 0) { + int trackCount = slCount(ctList); + /* add penalty in relation to number of tracks created, and adjust + * exitMs accordingly so that it will not hogExit at this time + */ + (void) earlyBotCheck(enteredMainTime, "hgTracks", (double)(trackCount + 1) * delayFraction, warnMs, (trackCount + 1)*exitMs); +} for (bl = browserLines; bl != NULL; bl = bl->next) { char *words[96]; int wordCount; char *dupe = cloneString(bl->name); wordCount = chopLine(dupe, words); if (wordCount >= 3) { char *command = words[1]; if (sameString(command, "position")) pos = cloneString(words[2]); } freez(&dupe);