massively speed up dronebl submitter query

This commit is contained in:
Em 2021-08-25 11:34:41 -04:00
parent a9a29518b0
commit 0298f3e0db
Signed by: emerson
GPG Key ID: 270669502DA603E3
1 changed files with 2 additions and 2 deletions

View File

@ -30,8 +30,8 @@ class DroneBL(object):
with self.conn:
with self.conn.cursor() as curs:
curs.execute(f"""select ip, exit_ip, proxy_type from proxies
where ip not in (select ip from dronebl) and
exit_ip not in (select ip from dronebl) and
where not exists (select ip from dronebl WHERE ip = proxies.ip) and
not exists (select ip from dronebl WHERE ip = proxies.exit_ip) and
status='active' limit 200""")
new_proxies = curs.fetchall()
proxies_to_test = []