a743575c79c1370bf4d7ad9573649bbc42e017a0 galt Mon Mar 25 11:23:38 2019 -0700 version 43. put the connection back like it was. doubled the timeout. incremented version. diff --git src/hg/utils/refreshNamedSessionCustomTracks/refreshNamedSessionCustomTracks.c src/hg/utils/refreshNamedSessionCustomTracks/refreshNamedSessionCustomTracks.c index 7e11986..3120c8d 100644 --- src/hg/utils/refreshNamedSessionCustomTracks/refreshNamedSessionCustomTracks.c +++ src/hg/utils/refreshNamedSessionCustomTracks/refreshNamedSessionCustomTracks.c @@ -4,43 +4,43 @@ /* Copyright (C) 2013 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "common.h" #include "options.h" #include "hash.h" #include "cheapcgi.h" #include "customTrack.h" #include "customFactory.h" #include "hui.h" #include "hgConfig.h" #include <sys/wait.h> #include <signal.h> #include "obscure.h" -int version = 42; // PLEASE INCREMENT THIS BEFORE PUSHING TO SHARED REPO +int version = 43; // PLEASE INCREMENT THIS BEFORE PUSHING TO SHARED REPO // SO THAT OTHERS MAY TEST WITH IT, SO THAT EVERYONE KNOWS THEY HAVE THE // EXACT RIGHT VERSION. #define savedSessionTable "namedSessionDb" int CFTEcalls = 0; int numUpdates = 0; int numForks = 10; -int timeoutSecs = 3600; // Timeout for each forked child process - // default 3600 seconds is one hour +int timeoutSecs = 7200; // Timeout for each forked child process + // default 7200 seconds is two hours char *testFailure = NULL; void usage() /* Explain usage and exit. */ { errAbort( "refreshNamedSessionCustomTracks -- scan central database table: '%s'\n" " contents for custom tracks and touch any that are found, to prevent\n" " them from being removed by the custom track cleanup process.\n" "usage:\n" " refreshNamedSessionCustomTracks hgcentral[test,beta] [-workDir=/path]\n" "options:\n" " -workDir=%s - a directory to work from where\n" " - ../trash can be found\n" @@ -461,36 +461,36 @@ // It is CRUCIAL that this program exits with non-zero exit code // when it or any of its children exit non-zero, abort, get killed, or crash, // in order to tell the calling program that it has failed. // This is the only thing will stop the deletion and loss of saved named sessions! // Every single session MUST be processed in order to save it from deletion. for (si = sessionList; si != NULL; si = si->next) { if (parent && sessionsPerForkDone == 0) { pid = forkIt(); if (pid == 0) { parent = FALSE; + conn = unCachedCentralConn(); // avoid cached connections when forking } } if (!parent) { - conn = unCachedCentralConn(); // avoid cached connections when forking scanSettingsForCT(si->userName, si->sessionName, &liveCount, &expiredCount, conn); } ++sessionsPerForkDone; if (sessionsPerForkDone >= perFork) // the fork has done all of its sessions { // Adjust for the fact that divisions have remainders. // We want to split the list into numForks, but it often does not divide evenly. // The first forkRem forks will get one extra session to do if forkRem > 0. // It use important that we do not create any extra fork so that the count will // match numForks (default 10) in the output. ++fork;