Skip to content

Instantly share code, notes, and snippets.

@redsquirrel
Created May 7, 2010 21:24
Show Gist options
  • Save redsquirrel/394018 to your computer and use it in GitHub Desktop.
Save redsquirrel/394018 to your computer and use it in GitHub Desktop.
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