Class: Push::Daemon::Feeder
Class Method Summary
collapse
adaptor_errors, check_database_is_connected, database_connection_lost, reconnect_database, sleep_to_avoid_thrashing, with_database_reconnect_and_retry
interrupt_sleep, interruptible_sleep
Class Method Details
.name ⇒ Object
7
8
9
|
# File 'lib/push/daemon/feeder.rb', line 7
def self.name
"Feeder"
end
|
.start(config) ⇒ Object
11
12
13
14
15
16
17
18
19
|
# File 'lib/push/daemon/feeder.rb', line 11
def self.start(config)
reconnect_database unless config.foreground
loop do
break if @stop
enqueue_notifications
interruptible_sleep config.push_poll
end
end
|
.stop ⇒ Object
21
22
23
24
|
# File 'lib/push/daemon/feeder.rb', line 21
def self.stop
@stop = true
interrupt_sleep
end
|