RoR Tips & Tricks Series – #2

Tip : count is incorrect if used with limit in mongoid Database : Mongodb 1. campaigns = Campaign.all campaigns.count => 211943 2. campaigns = Campaign.limit(1000) campaigns.count => 211943 campaigns[1001] => nil I was expecting count as 1000 for second query, but it came out to be same as first one. But actual objects stored inContinue reading “RoR Tips & Tricks Series – #2”

Sidekiq “reliable_fetch”​, not so reliable! Well sometimes…

Originally posted on Let's make learning fun!:
Recently, in one of my projects, I came across a situation wherein I was required to parse a CSV uploaded by the end user. For performance reasons, I choose to create a new Sidekiq worker for each row in my CSV. All these rows (workers) were running…