Module: QueueDispatcher::ActsAsTaskQueue::ClassMethods

Defined in:
lib/queue_dispatcher/acts_as_task_queue.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_task_queue(args = {}) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/queue_dispatcher/acts_as_task_queue.rb', line 34

def acts_as_task_queue(args = {})
  include ActionView::Helpers::UrlHelper
  include QdLogger

  include QueueDispatcher::ActsAsTaskQueue::InstanceMethods
  extend QueueDispatcher::ActsAsTaskQueue::SingletonMethods

  @acts_as_task_queue_config = QueueDispatcher::ActsAsTaskQueue::Config.new(args)

  has_many acts_as_task_queue_config.task_class_name.pluralize.to_sym, -> { order(:priority, :id) }
  serialize :interrupts, Array
end