dc10e2f415c03138342729c5d7667bf38bdae534 braney Tue Nov 6 14:03:29 2018 -0800 use udcTimeout instead of hub.timeToCheck as timeout before rechecking the hubs after an error. diff --git src/hg/lib/hubConnect.c src/hg/lib/hubConnect.c index e9b18a2..5bdd180 100644 --- src/hg/lib/hubConnect.c +++ src/hg/lib/hubConnect.c @@ -157,35 +157,33 @@ *errorMessage = cloneString(errCatch->message->string); } errCatchFree(&errCatch); if (gotWarning) { return NULL; } return tHub; } static boolean hubTimeToCheck(struct hubConnectStatus *hub, char *notOkStatus) /* check to see if enough time has passed to re-check a hub that - * has an error status. Default time to wait is 30 minutes, but this - * is configurable with the hub.timeToCheck conf variable */ + * has an error status. Use udcTimeout as the length of time to wait.*/ { -char *checkTimeString = cfgOptionDefault(hgHubConnectTimeToCheck, "1800"); -time_t checkTime = sqlUnsigned(checkTimeString); +time_t checkTime = udcCacheTimeout(); return dateIsOlderBy(notOkStatus, "%F %T", checkTime); } /* Given a hub ID return associated status. Returns NULL if no such hub. If hub * exists but has problems will return with errorMessage field filled in. */ struct hubConnectStatus *hubConnectStatusForId(struct sqlConnection *conn, int id) { struct hubConnectStatus *hub = NULL; char query[1024]; sqlSafef(query, sizeof(query), "select hubUrl,status, errorMessage,lastNotOkTime, shortLabel from %s where id=%d", getHubStatusTableName(), id); struct sqlResult *sr = sqlGetResult(conn, query); char **row = sqlNextRow(sr); if (row != NULL) {