B #: fix minor lxd monitoring bug (#183)

(cherry picked from commit ff8980cac5)
This commit is contained in:
Christian González authored and Ruben S. Montero committed 2020-09-04 14:11:43 +02:00
1 parent 4516352239
commit aa379a100e
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -104,7 +104,7 @@ class VirtualMachineDB
last = @db.execute("SELECT MAX(timestamp) from #{@dataset}").flatten![0]
last ||= @mtime.to_i
return sync_status(@host, @host_id) if last == 0 || time > (last + @conf[:sync])
return sync_status(@host, @host_id) if last == 0 || time > (last + @conf[:sync].to_i)
status_str = ''
monitor_ids = []
@@ -55,7 +55,7 @@ host_id = ARGV[-2]
begin
config = REXML::Document.new(xml_txt).root
sync = config.elements['PROBES_PERIOD/SYNC_STATE_VM'].text.to_s
sync = config.elements['PROBES_PERIOD/SYNC_STATE_VM'].text.to_i
rescue StandardError
sync = 180
end