Moved coalescence logic into resque library