From 90ee7854b8faeb44eb87360064cb13a9cfe2712d Mon Sep 17 00:00:00 2001 From: saint Date: Mon, 19 Aug 2024 22:04:37 +1000 Subject: [PATCH] v0.52 Improve handling and look at how we can improve ActiveRecord config for PostgreSQL and avoid insufficient pool size --- gossamer_forums.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 20dd2d2..1046d95 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1186,7 +1186,7 @@ class GossamerForumsImporter < ImportScripts::Base # Use connection pooling for PostgreSQL and synchronize access to shared resources # ActiveRecord::Base.connection_pool.with_connection do # ActiveRecord::Base.connected_to(pool: 'CustomPool') do - ActiveRecord::Base.connected_to do + ActiveRecord::Base.connected_to(role: :writing) do post_status = fetch_post_status(post_id) if post_status.nil? || post_status == 0 puts "Starting import for post_id #{post_id}"