mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
don't break the vBulletin importer when PrettyText times out
This commit is contained in:
@@ -12,6 +12,8 @@ class ImportScripts::VBulletin < ImportScripts::Base
|
|||||||
def initialize
|
def initialize
|
||||||
super
|
super
|
||||||
|
|
||||||
|
@old_username_to_new_usernames = {}
|
||||||
|
|
||||||
@tz = TZInfo::Timezone.get(TIMEZONE)
|
@tz = TZInfo::Timezone.get(TIMEZONE)
|
||||||
|
|
||||||
@htmlentities = HTMLEntities.new
|
@htmlentities = HTMLEntities.new
|
||||||
@@ -54,8 +56,6 @@ class ImportScripts::VBulletin < ImportScripts::Base
|
|||||||
def import_users
|
def import_users
|
||||||
puts "", "importing users"
|
puts "", "importing users"
|
||||||
|
|
||||||
@old_username_to_new_usernames = {}
|
|
||||||
|
|
||||||
user_count = mysql_query("SELECT COUNT(userid) count FROM user").first["count"]
|
user_count = mysql_query("SELECT COUNT(userid) count FROM user").first["count"]
|
||||||
|
|
||||||
# TODO: add email back in when using real data
|
# TODO: add email back in when using real data
|
||||||
@@ -303,6 +303,8 @@ class ImportScripts::VBulletin < ImportScripts::Base
|
|||||||
post.raw = new_raw
|
post.raw = new_raw
|
||||||
post.save
|
post.save
|
||||||
end
|
end
|
||||||
|
rescue PrettyText::JavaScriptError
|
||||||
|
nil
|
||||||
ensure
|
ensure
|
||||||
print_status(current += 1, max)
|
print_status(current += 1, max)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user