Skip to content Skip to sidebar Skip to footer

Values Are Not Inserted Into Mysql Table Using Pool.apply_async In Python2.7

I am trying to run the following code to populate a table in parallel for a certain application. First the following function is defined which is supposed to connect to my db and e

Solution 1:

Solution was changing dbwriter function to:

conn = MySQLdb.connect(host = # host ip,
                 user = # username, 
                 passwd = # password,
                 db = 'dedupe')
cursor = conn.cursor()
cursor.executemany(sql, rows)
cursor.close()
conn.commit()
conn.close()

Post a Comment for "Values Are Not Inserted Into Mysql Table Using Pool.apply_async In Python2.7"