fixes #1367
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class ApiCacheGenerator
|
||||
def generate_tag_cache
|
||||
path = File.expand_path(File.join(Rails.root, "..", "shared"))
|
||||
path = Danbooru.config.shared_dir_path
|
||||
FileUtils.mkdir_p("#{path}/system/cache")
|
||||
File.open("#{path}/system/cache/tags.json", "w") do |f|
|
||||
f.print("[")
|
||||
@@ -26,6 +26,6 @@ class ApiCacheGenerator
|
||||
gz.close
|
||||
end
|
||||
RemoteFileManager.new("#{path}/system/cache/tags.json").distribute
|
||||
RemoteFileManager.new("#{path}/shared/system/cache/tags.json.gz").distribute
|
||||
RemoteFileManager.new("#{path}/system/cache/tags.json.gz").distribute
|
||||
end
|
||||
end
|
||||
|
||||
@@ -310,5 +310,9 @@ module Danbooru
|
||||
# /var/www/danbooru2/shared/iqdb.db
|
||||
nil
|
||||
end
|
||||
|
||||
def shared_dir_path
|
||||
"/var/www/danbooru2/shared"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user