Class: SplitIoClient::Cache::Senders::EventsSender

Inherits:
Object
  • Object
show all
Defined in:
lib/splitclient-rb/cache/senders/events_sender.rb

Instance Method Summary collapse

Constructor Details

#initialize(events_repository, config) ⇒ EventsSender

Returns a new instance of EventsSender.



7
8
9
10
# File 'lib/splitclient-rb/cache/senders/events_sender.rb', line 7

def initialize(events_repository, config)
  @events_repository = events_repository
  @config = config
end

Instance Method Details

#callObject



12
13
14
15
16
17
18
19
20
# File 'lib/splitclient-rb/cache/senders/events_sender.rb', line 12

def call          
  events_thread

  if defined?(PhusionPassenger)
    PhusionPassenger.on_event(:starting_worker_process) do |forked|
      events_thread if forked
    end
  end
end