Skip to content

Instantly share code, notes, and snippets.

@International
Created November 25, 2012 19:24
Show Gist options
  • Save International/4144868 to your computer and use it in GitHub Desktop.
Save International/4144868 to your computer and use it in GitHub Desktop.
class SomeBackgroundOperation
def run
# code to run in the background goes here
end
end
# enqueing it to run
Rails.queue.push(SomeBackgroundOperation.new)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment