mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:52:11 +08:00
FIX: Create and consume temp table inside a transaction (#7030)
To prevent access issue in pgbouncer which runs in transaction pooling
This commit is contained in:
parent
1f4ace4f56
commit
da1ff2da2c
|
@ -34,6 +34,7 @@ class S3Inventory
|
|||
download_inventory_files_to_tmp_directory
|
||||
decompress_inventory_files
|
||||
|
||||
ActiveRecord::Base.transaction do
|
||||
begin
|
||||
table_name = "#{inventory_id}_inventory"
|
||||
connection = ActiveRecord::Base.connection.raw_connection
|
||||
|
@ -68,6 +69,7 @@ class S3Inventory
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def download_inventory_files_to_tmp_directory
|
||||
files.each do |file|
|
||||
|
|
Loading…
Reference in New Issue
Block a user