"prettier" thread exit message

This commit is contained in:
mickael
2019-01-06 05:13:23 +00:00
parent 6b4ca67b33
commit 0a34833d3d

View File

@@ -3,6 +3,7 @@
import threading
import time, random, string, re, copy
import requests
import sys
#from geoip import geolite2
import config
@@ -128,12 +129,13 @@ class WorkerThread():
if self.done.is_set(): break
time.sleep(0.01)
if self.thread:
_log("thread terminated", self.id)
sys.stdout.write('%s/%s\tthread terminated\r' % (time.strftime('%H:%M:%S', time.gmtime()), self.id))
sys.stdout.flush()
class Proxywatchd():
def stop(self):
_log('Requesting proxywatchd to halt (%d thread(s))' % len([item for item in self.threads if True]))
_log('\rRequesting proxywatchd to halt (%d thread(s))' % len([item for item in self.threads if True]))
self.stopping.set()
def _cleanup(self):