136481ed08005073b11b1b1f326ee7c85f4d2f58 hiram Tue Mar 26 13:14:56 2019 -0700 adding the botDelay functions refs #18869 diff --git src/hg/hubApi/apiUtils.c src/hg/hubApi/apiUtils.c index e1f6764..e304180 100644 --- src/hg/hubApi/apiUtils.c +++ src/hg/hubApi/apiUtils.c @@ -13,33 +13,35 @@ jsonWriteString(jw, "error", errMsg); jsonWriteObjectEnd(jw); fputs(jw->dy->string,stdout); exit(0); } struct jsonWrite *apiStartOutput() /* begin json output with standard header information for all requests */ { time_t timeNow = time(NULL); // struct tm tm; // gmtime_r(&timeNow, &tm); struct jsonWrite *jw = jsonWriteNew(); jsonWriteObjectStart(jw, NULL); // not recommended: jsonWriteString(jw, "apiVersion", "v"CGI_VERSION); -jsonWriteString(jw, "source", "UCSantaCruz"); +// not needed jsonWriteString(jw, "source", "UCSantaCruz"); jsonWriteDateFromUnix(jw, "downloadTime", (long long) timeNow); jsonWriteNumber(jw, "downloadTimeStamp", (long long) timeNow); +if (debug) + jsonWriteNumber(jw, "botDelay", (long long) botDelay); return jw; } int tableColumns(struct sqlConnection *conn, struct jsonWrite *jw, char *table, char ***nameReturn, char ***typeReturn) /* return the column names, and their MySQL data type, for the given table * return number of columns (aka 'fields') */ { // not needed jsonWriteListStart(jw, "columnNames"); struct sqlFieldInfo *fi, *fiList = sqlFieldInfoGet(conn, table); int columnCount = slCount(fiList); char **namesReturn = NULL; char **typesReturn = NULL; AllocArray(namesReturn, columnCount);