Skip to content

Instantly share code, notes, and snippets.

@npj
Created May 19, 2012 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save npj/2731581 to your computer and use it in GitHub Desktop.
Save npj/2731581 to your computer and use it in GitHub Desktop.
# app/models/queue/high.rb
class Queue::High
@queue = :high
def self.enqueue(object, method, *args)
# ...to be continued
end
def self.perform
# ...to be continued
end
end
# app/models/queue/normal.rb
class Queue::Normal
@queue = :normal
def self.enqueue(object, method, *args)
# ...to be continued
end
def self.perform
# ...to be continued
end
end
# app/models/queue/low.rb
class Queue::Low
@queue = :low
def self.enqueue(object, method, *args)
# ...to be continued
end
def self.perform
# ...to be continued
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment