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