make watchd.tor_safeguard a configurable option (default: True)
This commit is contained in:
@@ -266,7 +266,7 @@ class Proxywatchd():
|
||||
# check oldies ?
|
||||
if len(rows) < config.watchd.threads and config.watchd.oldies:
|
||||
## disable tor safeguard for old proxies
|
||||
self.tor_safeguard = False
|
||||
if self.tor_safeguard: self.tor_safeguard = False
|
||||
q += ' LIMIT ?'
|
||||
rows = self.mysqlite.execute(q, (config.watchd.max_fail, config.watchd.max_fail*2, config.watchd.checktime, config.watchd.oldies_checktime, time.time(), config.watchd.threads*config.watchd.oldies_multi)).fetchall()
|
||||
return rows
|
||||
@@ -274,7 +274,7 @@ class Proxywatchd():
|
||||
def prepare_jobs(self):
|
||||
self._prep_db()
|
||||
## enable tor safeguard by default
|
||||
self.tor_safeguard = True
|
||||
self.tor_safeguard = config.watchd.tor_safeguard
|
||||
rows = self.fetch_rows()
|
||||
for row in rows:
|
||||
job = WorkerJob(row[0], row[1], row[2], row[3], row[4])
|
||||
|
||||
Reference in New Issue
Block a user