v0.42.1 Rewrite and simplication of concurrent-ruby support

This commit is contained in:
David Sainty 2024-08-17 23:02:02 +10:00
parent 6edd8a985d
commit ef50d344c9

View File

@ -1268,7 +1268,6 @@ 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}"
@ -1279,11 +1278,12 @@ class GossamerForumsImporter < ImportScripts::Base
raw: sanitized_post_message,
created_at: Time.at(row['post_time']),
updated_at: Time.at(row['post_time']),
reads: post_views || 0
reads: post_views || 0,
post_number: post_number
)
# 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,7 +1321,6 @@ 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
@ -1331,11 +1330,12 @@ class GossamerForumsImporter < ImportScripts::Base
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
reads: reply_post_views || 0,
post_number: post_number
)
# 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