proxywatchd: improve logging

This commit is contained in:
rofl0r
2019-01-05 22:19:49 +00:00
parent b071400933
commit 2bb75b6c42

View File

@@ -117,7 +117,7 @@ class WorkerThread():
if self.done.is_set(): break
time.sleep(0.01)
if self.thread:
_log("thread %s terminated", self.id)
_log("thread terminated", self.id)
class Proxywatchd():
@@ -177,6 +177,7 @@ class Proxywatchd():
self.collected.extend(wt.collect())
def submit_collected(self):
_log("watchd main thread: updating %d entries"%len(self.collected))
self._prep_db()
query = 'UPDATE proxylist SET failed=?,tested=?,dronebl=?,country=?,proto=?,duration=? WHERE proxy=?'
args = [ (job.failcount, job.nextcheck, 1, 'unknown', job.proto, job.duration, job.proxy) for job in self.collected ]