diff --git a/lib/tasks/danbooru.rake b/lib/tasks/danbooru.rake index 33761b928..00c1ba964 100644 --- a/lib/tasks/danbooru.rake +++ b/lib/tasks/danbooru.rake @@ -4,6 +4,16 @@ namespace :danbooru do Clockwork::run end + # Schedules all posts to be reindexed in IQDB. Requires the delayed jobs + # worker (bin/delayed_job) to be running. + desc "Reindex all posts in IQDB" + task reindex_iqdb: :environment do + Post.find_each do |post| + puts "post ##{post.id}" + post.update_iqdb + end + end + namespace :docker do # Note that uncommited changes won't be included in the image; commit # changes first before building the image. diff --git a/lib/tasks/iqdb.rake b/lib/tasks/iqdb.rake deleted file mode 100644 index c4549dcc0..000000000 --- a/lib/tasks/iqdb.rake +++ /dev/null @@ -1,8 +0,0 @@ -namespace :iqdb do - task reindex_posts: :environment do - STDIN.each_line do |post_id| - puts post_id - post.update_iqdb - end - end -end