From a0dcd9fa8f686ae28e2cba82c4968097d9a1acce Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sun, 6 Jan 2019 15:23:23 +0000 Subject: [PATCH] save total_duration as int into the db without that, the DB saves it as float even though the column type is INT. requires a run of sqlite3 proxylist.sqlite "update proxylist set success_count=0,total_duration=0" to fix existing entries. --- proxywatchd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxywatchd.py b/proxywatchd.py index b693603..39f1ffc 100644 --- a/proxywatchd.py +++ b/proxywatchd.py @@ -77,7 +77,7 @@ class WorkerJob(): self.proto = proto self.failcount = 0 self.success_count = self.success_count + 1 - self.total_duration += duration*1000 + self.total_duration += int(duration*1000) _log('%s://%s; c: %s; d: %.2f sec(s); tor: %s; srv: %s; recv: %s' % (proto, self.proxy, match, duration, tor, srv, recv), 'xxxxx') except KeyboardInterrupt as e: raise e