bug fixes for iqdb

This commit is contained in:
r888888888
2014-03-26 17:20:34 -07:00
parent 594b09b8c9
commit c41d2a733b
3 changed files with 9 additions and 5 deletions

View File

@@ -1282,7 +1282,7 @@ class Post < ActiveRecord::Base
end
def update_iqdb_async
if Danbooru.config.iqdb_hostname_and_port
if Danbooru.config.iqdb_hostname_and_port && File.exists?(preview_file_path)
Danbooru.config.all_server_hosts.each do |host|
delay(:queue => host).update_iqdb
end
@@ -1290,7 +1290,7 @@ class Post < ActiveRecord::Base
end
def remove_iqdb_async
if Danbooru.config.iqdb_hostname_and_port
if Danbooru.config.iqdb_hostname_and_port && File.exists?(preview_file_path)
Danbooru.config.all_server_hosts.each do |host|
Post.delay(:queue => host).remove_iqdb(id)
end