Skip to content

Commit 0f6614b

Browse files
author
David Stirling
committed
Fix MySQL Tile Loader
1 parent 2829f23 commit 0f6614b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

cpa/dbconnect.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,11 @@ def connect(self, empty_sqlite_db=False):
327327
self.connectionInfo[connID] = (p.db_host, p.db_user,
328328
(p.db_passwd or None), p.db_name)
329329
logging.debug('[%s] Connected to database: %s as %s@%s'%(connID, p.db_name, p.db_user, p.db_host))
330-
if p.classification_type == 'image':
331-
self.CreateObjectImageTable()
332-
if p.check_tables == 'yes':
333-
self.CreateObjectCheckedTable()
330+
if connID == 'MainThread':
331+
if p.classification_type == 'image':
332+
self.CreateObjectImageTable()
333+
if p.check_tables == 'yes':
334+
self.CreateObjectCheckedTable()
334335
except DBError() as e:
335336
raise DBException('Failed to connect to database: %s as %s@%s (connID = "%s").\n %s'%(p.db_name, p.db_user, p.db_host, connID, e))
336337

0 commit comments

Comments
 (0)