mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
FIX: use same id for both original & optimized inventories in multisite setup.
This commit is contained in:
@ -120,6 +120,8 @@ class S3Inventory
|
|||||||
|
|
||||||
def download_inventory_files_to_tmp_directory
|
def download_inventory_files_to_tmp_directory
|
||||||
files.each do |file|
|
files.each do |file|
|
||||||
|
next if File.exists?(file[:filename])
|
||||||
|
|
||||||
log "Downloading inventory file '#{file[:key]}' to tmp directory..."
|
log "Downloading inventory file '#{file[:key]}' to tmp directory..."
|
||||||
failure_message = "Failed to inventory file '#{file[:key]}' to tmp directory."
|
failure_message = "Failed to inventory file '#{file[:key]}' to tmp directory."
|
||||||
|
|
||||||
@ -257,11 +259,8 @@ class S3Inventory
|
|||||||
|
|
||||||
def inventory_id
|
def inventory_id
|
||||||
@inventory_id ||= begin
|
@inventory_id ||= begin
|
||||||
if bucket_folder_path.present?
|
id = Rails.configuration.multisite ? "original" : type # TODO: rename multisite path to "uploads"
|
||||||
"#{bucket_folder_path}-#{type}"
|
bucket_folder_path.present? ? "#{bucket_folder_path}-#{id}" : id
|
||||||
else
|
|
||||||
type
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user