修改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

@@ -1,7 +1,7 @@
[settings]
type = 3
TargetRange = 1310371400, 1310379530
TargetImage = ./img/target5.jpg
type = 2
TargetRange = 2787071343, 2787091343
TargetImage = ./img/target4.jpg
[mysql]
host = 192.168.9.1

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()