Beispiel #1
0
 def __init__(self, heartbeat_interval_secs, agent_id, pd_queue,
              system_info):
     RepeatingTask.__init__(self, heartbeat_interval_secs, True)
     self._agent_id = agent_id
     self._pd_queue = pd_queue
     self._system_info = system_info
     # The following variables exist to ease unit testing:
     self._urllib2 = httpswithverify
     self._retry_gap_secs = RETRY_GAP_SECS
     self._heartbeat_max_retries = HEARTBEAT_MAX_RETRIES
Beispiel #2
0
 def __init__(
         self,
         pd_queue,
         send_interval_secs,
         cleanup_interval_secs,
         cleanup_threshold_secs,
         ):
     RepeatingTask.__init__(self, send_interval_secs, False)
     self.pd_queue = pd_queue
     self.cleanup_interval_secs = cleanup_interval_secs
     self.cleanup_threshold_secs = cleanup_threshold_secs
     self.last_cleanup_time = 0
     self._urllib2 = httpswithverify  # to ease unit testing.
Beispiel #3
0
 def __init__(
     self,
     pd_queue,
     send_interval_secs,
     cleanup_interval_secs,
     cleanup_threshold_secs,
 ):
     RepeatingTask.__init__(self, send_interval_secs, False)
     self.pd_queue = pd_queue
     self.cleanup_interval_secs = cleanup_interval_secs
     self.cleanup_threshold_secs = cleanup_threshold_secs
     self.last_cleanup_time = 0
     self._urllib2 = httpswithverify  # to ease unit testing.
Beispiel #4
0
 def __init__(
         self,
         heartbeat_interval_secs,
         agent_id,
         pd_queue,
         system_info
         ):
     RepeatingTask.__init__(self, heartbeat_interval_secs, True)
     self._agent_id = agent_id
     self._pd_queue = pd_queue
     self._system_info = system_info
     # The following variables exist to ease unit testing:
     self._urllib2 = httpswithverify
     self._retry_gap_secs = RETRY_GAP_SECS
     self._heartbeat_max_retries = HEARTBEAT_MAX_RETRIES
Beispiel #5
0
 def __init__(
     self,
     pd_queue,
     send_interval_secs,
     cleanup_interval_secs,
     cleanup_threshold_secs,
     source_address='0.0.0.0',
 ):
     RepeatingTask.__init__(self, send_interval_secs, False)
     self.pd_queue = pd_queue
     self.cleanup_interval_secs = cleanup_interval_secs
     self.cleanup_threshold_secs = cleanup_threshold_secs
     self.last_cleanup_time = 0
     self._source_address = source_address
     self._http = http  # to ease unit testing.