Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(19)  |  Call(17)  |  Derive(2)  |  Import(0)
A daemon thread which listens for control messages and can reload
the limit configuration from the database.

src/t/u/turnstile-HEAD/turnstile/middleware.py   turnstile(Download)
            self.control_daemon = remote.RemoteControlDaemon(self, self.conf)
        else:
            self.control_daemon = control.ControlDaemon(self, self.conf)
 
        # Now start the control daemon

src/t/u/turnstile-HEAD/turnstile/compactor.py   turnstile(Download)
            self.control_daemon = remote.RemoteControlDaemon(self, conf)
        else:
            self.control_daemon = control.ControlDaemon(self, conf)
 
        # Now start the control daemon

src/t/u/turnstile-0.7.0b2/turnstile/middleware.py   turnstile(Download)
            self.control_daemon = remote.RemoteControlDaemon(self, self.conf)
        else:
            self.control_daemon = control.ControlDaemon(self, self.conf)
 
        # Now start the control daemon

src/t/u/turnstile-0.7.0b2/turnstile/compactor.py   turnstile(Download)
            self.control_daemon = remote.RemoteControlDaemon(self, conf)
        else:
            self.control_daemon = control.ControlDaemon(self, conf)
 
        # Now start the control daemon

src/t/u/turnstile-HEAD/turnstile/remote.py   turnstile(Download)
class RemoteControlDaemon(control.ControlDaemon):
    """
    A daemon process which listens for control messages and can reload
    the limit configuration from the database.  Based on the
    ControlDaemon, but starts an RPC server to enable access to the

src/t/u/turnstile-0.7.0b2/turnstile/remote.py   turnstile(Download)
class RemoteControlDaemon(control.ControlDaemon):
    """
    A daemon process which listens for control messages and can reload
    the limit configuration from the database.  Based on the
    ControlDaemon, but starts an RPC server to enable access to the

src/t/u/turnstile-HEAD/tests/unit/test_control.py   turnstile(Download)
    def test_init(self):
        cd = control.ControlDaemon('middleware', 'config')
 
        self.assertEqual(cd._db, None)
        self.assertEqual(cd.middleware, 'middleware')
    def test_start(self, mock_reload, mock_spawn_n):
        cd = control.ControlDaemon('middleware', 'config')
 
        cd.start()
 
        db = mock.Mock(**{'pubsub.return_value': pubsub})
        mock_get_database.return_value = db
        cd = control.ControlDaemon('middleware', config.Config())
 
        cd.listen()
        db = mock.Mock(**{'pubsub.return_value': pubsub})
        mock_get_database.return_value = db
        cd = control.ControlDaemon('middleware', config.Config(conf_dict={
            'control.channel': 'other',
        }))
    def test_listen_shardhint(self, mock_get_database):
        pubsub = mock.Mock(**{'listen.return_value': []})
        db = mock.Mock(**{'pubsub.return_value': pubsub})
        mock_get_database.return_value = db
        cd = control.ControlDaemon('middleware', config.Config(conf_dict={