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)

This commit is contained in:
Miroslav Stampar 2011-10-28 11:25:07 +00:00
parent e290f2b80b
commit b83fe6113e

View File

@ -2141,7 +2141,7 @@ def wasLastRequestDelayed():
def adjustTimeDelay(lastQueryDuration, lowerStdLimit): 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)) candidate = 1 + int(round((1 - (lastQueryDuration - lowerStdLimit) / lastQueryDuration) * conf.timeSec))
@ -2150,14 +2150,11 @@ def adjustTimeDelay(lastQueryDuration, lowerStdLimit):
kb.delayCandidates = [candidate] + kb.delayCandidates[:-1] kb.delayCandidates = [candidate] + kb.delayCandidates[:-1]
if all([x == candidate for x in kb.delayCandidates]) and candidate < conf.timeSec: if all([x == candidate for x in kb.delayCandidates]) and candidate < conf.timeSec:
print infoMsg = "due to good response times you are advised to "
infoMsg += "try to adjust the time-delay to "
msg = "do you want to adjust the time delay to %d second%s " % (candidate, 's' if candidate > 1 else '') infoMsg += "a more appropriate value (e.g. --time-sec=%d)" % candidate
msg += "(due to good response times)? [Y/n] " singleTimeLogMessage(infoMsg)
inp = readInput(msg, default="Y") kb.adjustTimeDelay = False
if inp and inp[0].lower() == "y":
conf.timeSec = candidate
def extractErrorMessage(page): def extractErrorMessage(page):
""" """