Reduce the execution time of jobs of sidekiq

我的未来我决定 提交于 2019-12-06 09:29:06

indexes to the rescue.

class ContactDump
  index({status: 1})
end

class Person
  index({h_m_num: 1})
end

Person might need more indexes depending on what your Person.get_number_digest does.

After adding indexes run rake db:mongoid:create_indexes

Also, do remove the puts, you don't need that on your worker and puts is hitting your performance badly, even when you can't see the output!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!