From b83fe6113e98e6035ad9e66985543869f629d692 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 28 Oct 2011 11:25:07 +0000 Subject: [PATCH] turning off time adjustment off (now is shown as a tip) because it seems that it never was actually used (payload always left the same) --- lib/core/common.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 88893cdc7..2f2c73092 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -2141,7 +2141,7 @@ def wasLastRequestDelayed(): def adjustTimeDelay(lastQueryDuration, lowerStdLimit): """ - Adjusts time delay in time-based data retrieval + Provides tip for adjusting time delay in time-based data retrieval """ candidate = 1 + int(round((1 - (lastQueryDuration - lowerStdLimit) / lastQueryDuration) * conf.timeSec)) @@ -2150,14 +2150,11 @@ def adjustTimeDelay(lastQueryDuration, lowerStdLimit): kb.delayCandidates = [candidate] + kb.delayCandidates[:-1] if all([x == candidate for x in kb.delayCandidates]) and candidate < conf.timeSec: - print - - msg = "do you want to adjust the time delay to %d second%s " % (candidate, 's' if candidate > 1 else '') - msg += "(due to good response times)? [Y/n] " - inp = readInput(msg, default="Y") - - if inp and inp[0].lower() == "y": - conf.timeSec = candidate + infoMsg = "due to good response times you are advised to " + infoMsg += "try to adjust the time-delay to " + infoMsg += "a more appropriate value (e.g. --time-sec=%d)" % candidate + singleTimeLogMessage(infoMsg) + kb.adjustTimeDelay = False def extractErrorMessage(page): """