Class: Decidim::EventPublisherJob
- Inherits:
 - 
      ApplicationJob
      
        
- Object
 - ActiveJob::Base
 - ApplicationJob
 - Decidim::EventPublisherJob
 
 
- Defined in:
 - app/jobs/decidim/event_publisher_job.rb
 
Instance Attribute Summary collapse
- 
  
    
      #resource  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute resource.
 
Instance Method Summary collapse
Instance Attribute Details
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
      7 8 9  | 
    
      # File 'app/jobs/decidim/event_publisher_job.rb', line 7 def resource @resource end  | 
  
Instance Method Details
#perform(event_name, data) ⇒ Object
      9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31  | 
    
      # File 'app/jobs/decidim/event_publisher_job.rb', line 9 def perform(event_name, data) @resource = data[:resource] return unless data[:force_send] || notifiable? EmailNotificationGeneratorJob.perform_later( event_name, data[:event_class], data[:resource], data[:followers], data[:affected_users], data[:extra] ) NotificationGeneratorJob.perform_later( event_name, data[:event_class], data[:resource], data[:followers], data[:affected_users], data[:extra] ) end  |