def test_switch_going_down_flag(self):
     haproxy.set_going_down_flag(True)
     haproxy.switch_going_down_flag()
     self.assertEqual(False, haproxy.going_down_flag)
     haproxy.switch_going_down_flag()
     self.assertEqual(True, haproxy.going_down_flag)
 def test_switch_going_down_flag(self):
     haproxy.set_going_down_flag(True)
     haproxy.switch_going_down_flag()
     self.assertEquals(False, haproxy.going_down_flag)
     haproxy.switch_going_down_flag()
     self.assertEquals(True, haproxy.going_down_flag)
Exemple #3
0
def sighup_handler(signum, frame):
    """Switch the state of the HAProxy going_down flag."""
    haproxy.switch_going_down_flag()
    logging.getLogger('sighup').info(
        'Received SIGHUP, swiched going_down flag to %s' %
        haproxy.going_down_flag)
Exemple #4
0
def sighup_handler(signum, frame):
    """Switch the state of the HAProxy going_down flag."""
    haproxy.switch_going_down_flag()
    logging.getLogger('sighup').info(
        'Received SIGHUP, swiched going_down flag to %s' %
        haproxy.going_down_flag)