mirror of https://gitlab.com/bashrc2/epicyon
Leading zeroes
parent
dcc86e5279
commit
ace5cafa6d
|
@ -11973,7 +11973,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
recentCrawlers = 60 * 60 * 24 * 30
|
||||
for uaStr, item in knownCrawlers.items():
|
||||
if item['lastseen'] - currTime < recentCrawlers:
|
||||
crawlersList.append(str(item['hits']) + ' ' + uaStr)
|
||||
hitsStr = str(item['hits']).zfill(8)
|
||||
crawlersList.append(hitsStr + ' ' + uaStr)
|
||||
crawlersList.sort(reverse=True)
|
||||
msg = ''
|
||||
for lineStr in crawlersList:
|
||||
|
|
|
@ -58,12 +58,7 @@ def sortedWatchPoints(fitness: {}, fitnessId: str) -> []:
|
|||
if not item.get('total'):
|
||||
continue
|
||||
averageTime = item['total'] * 1000 / item['ctr']
|
||||
averageTimeStr = str(averageTime)
|
||||
threshold = 10
|
||||
while threshold < 100000:
|
||||
if averageTime < threshold:
|
||||
averageTimeStr = '0' + averageTimeStr
|
||||
threshold *= 10
|
||||
averageTimeStr = str(averageTime).zfill(8)
|
||||
result.append(averageTimeStr + ' ' + watchPoint)
|
||||
result.sort(reverse=True)
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue