Class: EventDrivenWorkers::HhSearch::ProducerWorker

Inherits:
ApplicationWorker
  • Object
show all
Defined in:
app/workers/event_driven_workers/hh_search/producer_worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(topic, event_type, object_id, changed_attributes = {}, options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'app/workers/event_driven_workers/hh_search/producer_worker.rb', line 7

def perform(topic, event_type, object_id, changed_attributes = {}, options = {})
  # We can chain the event driven client in the future
  # If we want to use or move to another platform
  return unless Flipper.enabled?(:kafka_producer_hhsearch)

  changed_attributes = normalize_changed_attributes(changed_attributes)
  producer = build_producer(topic, object_id, event_type, changed_attributes, options)

  producer.send_event
end