修改BUG:选择正确的type后,再初始化Mysql连接池

This commit is contained in:
Qiea
2024-12-22 20:32:38 +08:00
parent 5949ad2d02
commit 383435dc1a
2 changed files with 5 additions and 5 deletions

View File

@@ -12,9 +12,8 @@ if not os.path.exists('img'):
if __name__ == '__main__':
pool = MySQLConnectionPool()
if type == 1:
pool = MySQLConnectionPool()
Thread = FindThread(TargetImageHash, pool)
Thread.start()
@@ -25,6 +24,7 @@ if __name__ == '__main__':
baseArr += 1
elif type == 3:
pool = MySQLConnectionPool()
while baseArr <= TargetRange[1]:
Thread = UploadThread(baseArr, pool)
Thread.start()