6f949e90b1ba3de976455fbcf9da21897761d134 markd Fri Oct 29 16:11:58 2021 -0700 add timeout option to pipeline to allow kill long-running pipelines, especially ones run from CGIs diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 745b44a..51845e0 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -25843,52 +25843,52 @@ char *dot = strrchr(buffer, '.'); safecpy(dot+1, sizeof buffer - 1 - (dot - buffer), newSuffix); return cloneString(buffer); } static void makeBigPsl(char *pslName, char *faName, char *db, char *outputBigBed) /* Make a bigPsl with the blat results. */ { char *bigPslFile = replaceSuffix(outputBigBed, "bigPsl"); char faNameBuffer[strlen("-fa=") + strlen(faName) + 1]; safef(faNameBuffer, sizeof faNameBuffer, "-fa=%s", faName); char *cmd11[] = {"loader/pslToBigPsl", pslName, faNameBuffer, "stdout", NULL}; char *cmd12[] = {"sort","-k1,1","-k2,2n", NULL}; char **cmds1[] = { cmd11, cmd12, NULL}; -struct pipeline *pl = pipelineOpen(cmds1, pipelineWrite, bigPslFile, NULL); +struct pipeline *pl = pipelineOpen(cmds1, pipelineWrite, bigPslFile, NULL, 0); pipelineWait(pl); char buf[4096]; char *twoBitDir; if (trackHubDatabase(db)) { struct trackHubGenome *genome = trackHubGetGenome(db); twoBitDir = genome->twoBitPath; } else { safef(buf, sizeof(buf), "/gbdb/%s", db); twoBitDir = hReplaceGbdbSeqDir(buf, db); safef(buf, sizeof(buf), "%s%s.2bit", twoBitDir, db); twoBitDir = buf; } char udcDir[strlen(udcDefaultDir()) + strlen("-udcDir=") + 1]; safef(udcDir, sizeof udcDir, "-udcDir=%s", udcDefaultDir()); char *cmd2[] = {"loader/bedToBigBed","-verbose=0",udcDir,"-extraIndex=name","-sizesIs2Bit", "-tab", "-as=loader/bigPsl.as","-type=bed12+13", bigPslFile, twoBitDir, outputBigBed, NULL}; -pl = pipelineOpen1(cmd2, pipelineRead, NULL, NULL); +pl = pipelineOpen1(cmd2, pipelineRead, NULL, NULL, 0); pipelineWait(pl); unlink(bigPslFile); } static void buildBigPsl(char *fileNames) /* Build a custom track with a bigPsl file out of blat results. * Bring up the bigPsl detail page with all the alignments. */ { char *trackName = cartString(cart, "trackName"); char *trackDescription = cartString(cart, "trackDescription"); char *pslName, *faName, *qName; parseSs(fileNames, &pslName, &faName, &qName); struct tempName bigBedTn;