Class: Zabbirc::Services::Ops
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #join, #start, #stop, #synchronize
Constructor Details
This class inherits a constructor from Zabbirc::Services::Base
Instance Method Details
#iterate ⇒ Object
4 5 6 7 8 9 |
# File 'lib/zabbirc/services/ops.rb', line 4 def iterate sync_ops synchronize do @service.ops.dump_settings end end |
#sync_ops ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/zabbirc/services/ops.rb', line 11 def sync_ops synchronize do sync_zabbix @cinch_bot.channels.each do |channel| sync_irc channel end end rescue Zabbix::NotConnected => e if Zabbix::Connection.up? @service.ops.interested.notify e.to_s Zabbix::Connection.down! end end |