RailsCasts Pro episodes are now free!

Learn more or hide this

Thomas Klemm's Profile

GitHub User: thomasklemm

Comments by Thomas Klemm


There's a gem that can help with one-off notifications, too: Paul Revere by Thoughtbot


Knight's Spreadsheets (Ruby) section compiles a list of gems that can help with parsing and writing Spreadsheets and CSV. Knight.io is a gem wiki for developers, a current project of mine.


Joe asked this question on the sidekiq mailing list. Here are the responses:

By Darren Boyd:
It's possible this is a race condition with your ActiveRecord transactions.

If you are creating a job in an after_save (or after_create/update) callback, it's possible that sidekiq is starting the job before the database transaction is committed. Since the sidekiq doesn't see the DB change inside the job creator's transaction, the record isn't there (yet).

There's a longer explanation and a solution here: http://rails-bestpractices.com/posts/695-use-after_commit

Hope that helps.

By Mike Perham (Creator of Sidekiq):
Yep, we see this all the time at The Clymb. The answer is to use
either after_commit or delay_for(5.seconds).