Skip to content
Create a gist now

Instantly share code, notes, and snippets.

# app/models/queue/base.rb
class Queue::Base
class << self
def enqueue(object, method, *args)
# ...to be continued
end
def perform
# ...to be continued
end
end
end
# app/models/queue/high.rb
class Queue::High < Queue::Base
@queue = :high
end
# app/models/queue/normal.rb
class Queue::Normal < Queue::Base
@queue = :normal
end
# app/models/queue/low.rb
class Queue::Low < Queue::Base
@queue = :low
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.