Commit 20a5fa91 by Rocky Duan

removed unnecessary code

parent 2551f1f4
......@@ -46,7 +46,7 @@ require './api/notifications_and_subscriptions'
if environment.to_s == "development"
get "#{APIPREFIX}/clean" do
[Comment, CommentThread, User, Notification, Subscription, Activity].each(&:delete_all)
[Delayed::Backend::Mongoid::Job, Comment, CommentThread, User, Notification, Subscription, Activity].each(&:delete_all).each(&:remove_indexes).each(&:create_indexes)
{}.to_json
end
end
......
......@@ -2,9 +2,6 @@ require 'rest_client'
namespace :benchmark do
task :bulk_generate => :environment do
[Comment, CommentThread, User, Notification, Subscription].each(&:delete_all).each(&:create_indexes)
Delayed::Backend::Mongoid::Job.create_indexes
seed_config = YAML.load_file("config/benchmark.yml").with_indifferent_access
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment