Class: GeoConcerns::EventsGenerator::GeoserverEventGenerator

Inherits:
BaseEventsGenerator show all
Defined in:
app/services/geo_concerns/events_generator/geoserver_event_generator.rb

Instance Method Summary collapse

Methods inherited from BaseEventsGenerator

#initialize

Constructor Details

This class inherits a constructor from GeoConcerns::EventsGenerator::BaseEventsGenerator

Instance Method Details

#derivatives_created(record) ⇒ Object



4
5
6
7
8
9
# File 'app/services/geo_concerns/events_generator/geoserver_event_generator.rb', line 4

def derivatives_created(record)
  return unless geo_file?(record)
  publish_message(
    message("CREATED", record)
  )
end

#message(type, record) ⇒ Object



19
20
21
# File 'app/services/geo_concerns/events_generator/geoserver_event_generator.rb', line 19

def message(type, record)
  base_message(type, record).merge("exchange" => :geoserver)
end

#record_updated(record) ⇒ Object

Message that file set has update.



12
13
14
15
16
17
# File 'app/services/geo_concerns/events_generator/geoserver_event_generator.rb', line 12

def record_updated(record)
  return unless geo_file?(record)
  publish_message(
    message("UPDATED", record)
  )
end