Exemplo n.º 1
0
 def send_stats_once(self):
     try:
         if self.must_send_stats():
             if self.ping_collector():
                 self.send_action_log()
                 self.send_installation_info()
                 self.send_oswl_info()
                 time.sleep(dithered(settings.STATS_SEND_INTERVAL))
             else:
                 time.sleep(dithered(settings.COLLECTOR_PING_INTERVAL))
         else:
             time.sleep(dithered(settings.STATS_ENABLE_CHECK_INTERVAL))
     except Exception as e:
         logger.error("Stats sender exception: %s", six.text_type(e))
     finally:
         db.remove()
Exemplo n.º 2
0
 def send_stats_once(self):
     try:
         if objects.MasterNodeSettings.must_send_stats():
             if self.ping_collector():
                 self.send_action_log()
                 self.send_installation_info()
                 self.send_oswl_info()
                 time.sleep(dithered(settings.STATS_SEND_INTERVAL))
             else:
                 time.sleep(dithered(settings.COLLECTOR_PING_INTERVAL))
         else:
             time.sleep(dithered(settings.STATS_ENABLE_CHECK_INTERVAL))
     except Exception as e:
         logger.error("Stats sender exception: %s", six.text_type(e))
         time.sleep(dithered(settings.COLLECTOR_PING_INTERVAL))
     finally:
         db.remove()