Created
May 7, 2010 21:24
-
-
Save redsquirrel/394018 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExampleWorker | |
extend ResqueHelper | |
@queue = :example | |
def self.perform(user_id) | |
logger.info("Checking to see if there are any other jobs queued for user #{user_id}") | |
return if already_queued? { |args| args.first == user_id } | |
# do something expensive... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment