radiobert: lower collectd-adsb interval to 1, catch exceptions
This commit is contained in:
parent
a80e15487e
commit
31d24d2b54
|
@ -5,7 +5,7 @@ require 'json'
|
|||
require 'distance'
|
||||
|
||||
HOSTNAME = IO::readlines("/proc/sys/kernel/hostname").join.chomp
|
||||
INTERVAL = 10
|
||||
INTERVAL = 1
|
||||
POS = [ 51.08102, 13.72806 ]
|
||||
|
||||
loop do
|
||||
|
@ -23,5 +23,10 @@ loop do
|
|||
puts "PUTVAL \"#{HOSTNAME}/dump1090-distance/current-#{flight}\" interval=#{INTERVAL} N:#{dist}"
|
||||
end
|
||||
|
||||
rescue
|
||||
STDERR.puts $!
|
||||
|
||||
ensure
|
||||
sleep INTERVAL
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue