v0.45 SQLIte mutexes only wrap around updates now

This commit is contained in:
David Sainty 2024-08-18 05:30:38 +10:00
parent 0372db9cc7
commit f7db3e8991

View File

@ -1361,10 +1361,14 @@ class GossamerForumsImporter < ImportScripts::Base
puts "CREATE REPLY in topic_id #{topic.id}" puts "CREATE REPLY in topic_id #{topic.id}"
def get_topic_id
return topic.id
end
# Increment the post count for the topic # Increment the post count for the topic
post_number = fetch_db_topic_post_numbers(topic.id).to_i + 1 post_number = fetch_db_topic_post_numbers(topic.id).to_i + 1
sqlite_mutex.synchronize do sqlite_mutex.synchronize do
update_db_topic_post_numbers(topic.id, post_number) ### update_db_topic_post_numbers(topic.id, post_number)
update_db_topic_post_numbers(get_topic_id, post_number)
end end
# Fetch the number of views the post has had # Fetch the number of views the post has had