change default server login from albert -> danbooru

This commit is contained in:
Albert Yi
2018-10-08 15:51:23 -07:00
parent 7eab2fc0a7
commit f065186c32
2 changed files with 1 additions and 21 deletions

View File

@@ -1,24 +1,4 @@
class DailyMaintenance
def hourly
sm = Danbooru.config.storage_manager
Post.where("id >= ? and created_at > ?", 3275713, 1.day.ago).find_each do |post|
if HTTParty.head("https://sonohara.donmai.us/data/#{post.md5}.#{post.file_ext}").code == 404
puts ["o", post.id, post.md5].inspect
UploadService::Utils.distribute_files File.open(sm.file_path(post, post.file_ext, :original), "rb"), post, :original
end
if post.has_preview? && HTTParty.head("https://sonohara.donmai.us/data/preview/#{post.md5}.jpg").code == 404
puts ["p", post.id, post.md5].inspect
UploadService::Utils.distribute_files File.open(sm.file_path(post, post.file_ext, :preview), "rb"), post, :preview
end
if post.has_large? && HTTParty.head("https://sonohara.donmai.us/data/sample/sample-#{post.md5}.jpg").code == 404
puts ["l", post.id, post.md5].inspect
UploadService::Utils.distribute_files File.open(sm.file_path(post, post.file_ext, :large), "rb"), post, :large
end
end
end
def run
ActiveRecord::Base.connection.execute("set statement_timeout = 0")
PostPruner.new.prune!

View File

@@ -240,7 +240,7 @@ module Danbooru
end
def remote_server_login
"albert"
"danbooru"
end
def archive_server_login