Class: Pgq::Consumer

Inherits:
ConsumerBase show all
Defined in:
lib/pgq/consumer.rb

Overview

Cute class, for magick inserts and light consume

Direct Known Subclasses

ConsumerGroup

Instance Attribute Summary

Attributes inherited from ConsumerBase

#consumer_name, #logger, #queue_name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ConsumerBase

#all_events_failed, #coder, coder, #connection, connection, consumer_name, #database, database, enqueue, #event_failed, #event_retry, extract_queue_name, #finish_batch, #get_batch_events, inherited, #initialize, #log_error, #log_info, next_queue_name, #perform_batch, #perform_event, #perform_events, queue_name, set_queue_name

Methods included from Utils

#add_queue, #delete_failed_events, #inspect_londiste_queue, #inspect_queue, #inspect_self_queue, #proxy, #queues_list, #remove_queue, #retry_failed_events

Constructor Details

This class inherits a constructor from Pgq::ConsumerBase

Class Method Details

.add_event(method_name, *args) ⇒ Object



13
14
15
# File 'lib/pgq/consumer.rb', line 13

def self.add_event(method_name, *args)
  enqueue(method_name, *args)
end

.method_missing(method_name, *args) ⇒ Object

magick insert events



9
10
11
# File 'lib/pgq/consumer.rb', line 9

def self.method_missing(method_name, *args)
  enqueue(method_name, *args)
end

Instance Method Details

#perform(method_name, *args) ⇒ Object

magick consume



19
20
21
# File 'lib/pgq/consumer.rb', line 19

def perform(method_name, *args)
  self.send(method_name, *args)
end