fix dmail tests

This commit is contained in:
r888888888
2014-03-26 16:01:10 -07:00
parent 3c417392ad
commit 594b09b8c9
3 changed files with 19 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
class CurrentUser
def self.scoped(user, ip_addr)
def self.scoped(user, ip_addr = "127.0.0.1")
old_user = self.user
old_ip_addr = self.ip_addr

View File

@@ -1282,14 +1282,18 @@ class Post < ActiveRecord::Base
end
def update_iqdb_async
Danbooru.config.all_server_hosts.each do |host|
delay(:queue => host).update_iqdb
if Danbooru.config.iqdb_hostname_and_port
Danbooru.config.all_server_hosts.each do |host|
delay(:queue => host).update_iqdb
end
end
end
def remove_iqdb_async
Danbooru.config.all_server_hosts.each do |host|
Post.delay(:queue => host).remove_iqdb(id)
if Danbooru.config.iqdb_hostname_and_port
Danbooru.config.all_server_hosts.each do |host|
Post.delay(:queue => host).remove_iqdb(id)
end
end
end