fix: use canonical schema from dbs.py in proxywatchd

This commit is contained in:
Username
2025-12-21 10:30:31 +01:00
parent f4e242fc18
commit 8718d33276

View File

@@ -627,10 +627,9 @@ class Proxywatchd():
self.pending_states = [] # list of ProxyTestState awaiting completion self.pending_states = [] # list of ProxyTestState awaiting completion
self.pending_lock = threading.Lock() self.pending_lock = threading.Lock()
# create table if needed # create table if needed (use dbs.py for canonical schema)
self._prep_db() self._prep_db()
self.mysqlite.execute('CREATE TABLE IF NOT EXISTS proxylist (proxy BLOB, country BLOB, added INT, failed INT, tested INT, source BLOB, dronebl INT, proto TEXT, success_count INT, total_duration INT, ip TEXT, port INT)') dbs.create_table_if_not_exists(self.mysqlite, 'proxylist')
self.mysqlite.commit()
self._close_db() self._close_db()
self.submit_after = config.watchd.submit_after # number of collected jobs before writing db self.submit_after = config.watchd.submit_after # number of collected jobs before writing db