I have tried for days without success to update the records in my MySQL
database using grails. I always get a java.sql.SQLException
which is caused by:
Lock wait timeout exceeded
Here is the code I am using:
def campaignUpdater(id, details){
def dbData = Campaigns.get(id)
if(dbData){
dbData.totalSent = details.totalSent
dbData.totalQueued = details.totalQueued
dbData.totalFailed = details.totalFailed
dbData.uniqueClickers = details.uniqueClickers
dbData.opened = details.opened
dbData.save(flush: true, failOnError: true)
return true
}else
return false
}
I really need help as soon as possible.