update times used
This commit is contained in:
parent
5377a7543c
commit
1ba445ae41
@ -52,6 +52,8 @@ public:
|
||||
// waiting on test url to be downloaded
|
||||
bool m_isWaiting;
|
||||
|
||||
long long m_timesUsed;
|
||||
|
||||
// special things used by LoadBucket algo to determine which
|
||||
// SpiderProxy to use to download from a particular IP
|
||||
long m_countForThisIp;
|
||||
@ -252,6 +254,9 @@ bool printSpiderProxyTable ( SafeBuf *sb ) {
|
||||
"<td>"
|
||||
"<b>proxy IP</b></td>"
|
||||
"<td><b>proxy port</b></td>"
|
||||
|
||||
"<td><b>times used</b></td>"
|
||||
|
||||
// time of last successful download. print "none"
|
||||
// if never successfully used
|
||||
"<td><b>test url last successful download</b></td>"
|
||||
@ -293,6 +298,8 @@ bool printSpiderProxyTable ( SafeBuf *sb ) {
|
||||
, (long)sp->m_port
|
||||
);
|
||||
|
||||
sb->safePrintf("<td>%lli</td>",sp->m_timesUsed);
|
||||
|
||||
// last SUCCESSFUL download time ago. when it completed.
|
||||
long ago = now - sp->m_lastSuccessfulTestMS/1000;
|
||||
sb->safePrintf("<td>");
|
||||
@ -552,6 +559,9 @@ void handleRequest54 ( UdpSlot *udpSlot , long niceness ) {
|
||||
|
||||
long long nowms = gettimeofdayInMillisecondsLocal();
|
||||
|
||||
// winner count update
|
||||
winnersp->m_timesUsed++;
|
||||
|
||||
// add a new load bucket then!
|
||||
LoadBucket bb;
|
||||
bb.m_urlIp = urlIp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user