Class: QueueBus::Adapters::Data
  
  
  
  
  
    - Inherits:
- 
      Base
      
        
          - Object
- Base
- QueueBus::Adapters::Data
 show all
    - Defined in:
- lib/queue_bus/adapters/data.rb
 
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  Methods inherited from Base
  #initialize
  
    Instance Method Details
    
      
  
  
    #enabled!  ⇒ Object 
  
  
  
  
    | 
5
6
7 | # File 'lib/queue_bus/adapters/data.rb', line 5
def enabled!
  end | 
 
    
      
  
  
    #enqueue(queue_name, klass, json)  ⇒ Object 
  
  
  
  
    | 
18
19
20 | # File 'lib/queue_bus/adapters/data.rb', line 18
def enqueue(queue_name, klass, json)
  push(queue_name, :class => klass.to_s, :args => [json])
end | 
 
    
      
  
  
    #enqueue_at(epoch_seconds, queue_name, klass, json)  ⇒ Object 
  
  
  
  
    | 
22
23
24
25 | # File 'lib/queue_bus/adapters/data.rb', line 22
def enqueue_at(epoch_seconds, queue_name, klass, json)
  item = delayed_job_to_hash_with_queue(queue_name, klass, [json])
  delayed_push(epoch_seconds, item)
end | 
 
    
      
  
  
    #redis(&block)  ⇒ Object 
  
  
  
  
    | 
13
14
15
16 | # File 'lib/queue_bus/adapters/data.rb', line 13
def redis(&block)
  raise "no redis instance set" unless @redis
  block.call(@redis)
end | 
 
    
      
  
  
    #redis=(client)  ⇒ Object 
  
  
  
  
    | 
9
10
11 | # File 'lib/queue_bus/adapters/data.rb', line 9
def redis=(client)
  @redis = client
end | 
 
    
      
  
  
    #setup_heartbeat!(queue_name)  ⇒ Object 
  
  
  
  
    | 
27
28
29 | # File 'lib/queue_bus/adapters/data.rb', line 27
def setup_heartbeat!(queue_name)
  raise NotImplementedError
end |