FIX: topic links with long titles can not be crawled

0..255 == 256 numbers column fits 255
This commit is contained in:
Sam 2015-08-18 17:34:46 +10:00
parent 45adeacd45
commit add6e12ce4

View File

@ -119,7 +119,7 @@ module Jobs
title.gsub!(/ +/, ' ')
title.strip!
if title.present?
crawled = (TopicLink.where(id: topic_link.id).update_all(['title = ?, crawled_at = CURRENT_TIMESTAMP', title[0..255]]) == 1)
crawled = (TopicLink.where(id: topic_link.id).update_all(['title = ?, crawled_at = CURRENT_TIMESTAMP', title[0..254]]) == 1)
end
end
end