This commit is contained in:
r888888888
2014-05-22 17:42:34 -07:00
parent 1043ef8d3d
commit aff658a947
2 changed files with 6 additions and 2 deletions

View File

@@ -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

View File

@@ -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