Asynchronous refactoring using RQ.

* when a new event arises, it's sent to a background worker and the PR
  state is set to pending.