Skip to content

Instantly share code, notes, and snippets.

View jdhollis's full-sized avatar
🌊

J.D. Hollis jdhollis

🌊
View GitHub Profile
@jdhollis
jdhollis / resque_async_handling.rb
Created June 9, 2010 21:43
handle_asynchronously for Resque
module Resque
module AsyncHandling
# To disable (in config.after_initialize):
# Resque::AsyncHandling.enabled = false
mattr_accessor :enabled
self.enabled = true
def handle_asynchronously(original_method, params = { })
if enabled
now_method = "#{ original_method }_now"