修改BUG:选择正确的type后,再初始化Mysql连接池
This commit is contained in:
4
main.py
4
main.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user