\r
check = query.prepare("Update note set thumbnail = :thumbnail where guid=:guid");\r
query.bindValue(":guid", guid);\r
- int x = thumbnail.size();\r
query.bindValue(":thumbnail", thumbnail.toByteArray());\r
check = query.exec();\r
if (!check) \r
boolean check;\r
NSqlQuery query = new NSqlQuery(db.getConnection());\r
\r
- check = query.prepare("select guid from note where thumbnailneeded=true and isExpunged=false limit 5");\r
+ check = query.prepare("select guid from note where thumbnailneeded=true and isExpunged=false and DATEDIFF('MINUTE',updated,CURRENT_TIMESTAMP)>5 limit 5");\r
check = query.exec();\r
if (!check) \r
logger.log(logger.EXTREME, "Note SQL findThumbnailsNeeded query failed: " +query.lastError().toString());\r