v0.42.1 Rewrite and simplication of concurrent-ruby support
This commit is contained in:
parent
6edd8a985d
commit
ef50d344c9
@ -1268,22 +1268,22 @@ class GossamerForumsImporter < ImportScripts::Base
|
||||
# Increment the post count for the topic
|
||||
post_number = fetch_db_topic_post_numbers(topic.id).to_i + 1
|
||||
update_db_topic_post_numbers(topic.id, post_number)
|
||||
end
|
||||
|
||||
puts "TIJ GG post_id #{post_id}"
|
||||
|
||||
# Create the initial post in the new topic
|
||||
post = Post.create!(
|
||||
topic_id: topic.id,
|
||||
user_id: discourse_user_id,
|
||||
raw: sanitized_post_message,
|
||||
created_at: Time.at(row['post_time']),
|
||||
updated_at: Time.at(row['post_time']),
|
||||
reads: post_views || 0
|
||||
)
|
||||
# post_number: post_number
|
||||
post.custom_fields['original_gossamer_id'] = row['post_id']
|
||||
post.save!
|
||||
# Create the initial post in the new topic
|
||||
post = Post.create!(
|
||||
topic_id: topic.id,
|
||||
user_id: discourse_user_id,
|
||||
raw: sanitized_post_message,
|
||||
created_at: Time.at(row['post_time']),
|
||||
updated_at: Time.at(row['post_time']),
|
||||
reads: post_views || 0,
|
||||
post_number: post_number
|
||||
)
|
||||
post.custom_fields['original_gossamer_id'] = row['post_id']
|
||||
post.save!
|
||||
end
|
||||
|
||||
sqlite_mutex.synchronize do
|
||||
# Increment the post count for the topic and user
|
||||
@ -1321,21 +1321,21 @@ class GossamerForumsImporter < ImportScripts::Base
|
||||
|
||||
# Fetch the number of views the post has had
|
||||
reply_post_views = fetch_post_views(reply_row['post_id'])
|
||||
end
|
||||
|
||||
puts "TIJ JJ post_id #{post_id}"
|
||||
# Create the reply post in the existing topic
|
||||
post = Post.create!(
|
||||
topic_id: topic.id,
|
||||
user_id: reply_user_id,
|
||||
raw: sanitized_reply_message,
|
||||
created_at: Time.at(reply_row['post_time']),
|
||||
updated_at: Time.at(reply_row['post_time']),
|
||||
reads: reply_post_views || 0
|
||||
)
|
||||
# post_number: post_number
|
||||
post.custom_fields['original_gossamer_id'] = reply_row['post_id']
|
||||
post.save!
|
||||
# Create the reply post in the existing topic
|
||||
post = Post.create!(
|
||||
topic_id: topic.id,
|
||||
user_id: reply_user_id,
|
||||
raw: sanitized_reply_message,
|
||||
created_at: Time.at(reply_row['post_time']),
|
||||
updated_at: Time.at(reply_row['post_time']),
|
||||
reads: reply_post_views || 0,
|
||||
post_number: post_number
|
||||
)
|
||||
post.custom_fields['original_gossamer_id'] = reply_row['post_id']
|
||||
post.save!
|
||||
end
|
||||
|
||||
puts "TIJ KK post_id #{post_id}"
|
||||
# Increment the post count for the topic and user
|
||||
|
Loading…
Reference in New Issue
Block a user