예제 #1
0
    def __init__(self,
                 host_list=None,
                 poll_timeout=DEFAULT_ADMIN_CLIENT_TIMEOUT):
        super(GearmanAdminClient, self).__init__(host_list=host_list)
        self.poll_timeout = poll_timeout

        self.current_connection = util.unlist(self.connection_list)
        self.current_handler = None
예제 #2
0
    def __init__(self, host_list=None, timeout=DEFAULT_ADMIN_CLIENT_TIMEOUT):
        super(GearmanAdminClient, self).__init__(host_list=host_list)
        self.admin_client_timeout = timeout

        self.current_connection = util.unlist(self.connection_list)

        if not self.attempt_connect(self.current_connection):
            raise ServerUnavailable('Found no valid connections in list: %r' % self.connection_list)

        self.current_handler = self.connection_to_handler_map[self.current_connection]
예제 #3
0
    def __init__(self,
                 host_list=None,
                 poll_timeout=DEFAULT_ADMIN_CLIENT_TIMEOUT):
        super(GearmanAdminClient, self).__init__(host_list=host_list)
        self.poll_timeout = poll_timeout

        # TODO: We could change the API here so this class only allows
        # passing a single host, not a list.
        try:
            self.current_connection = unlist(self.connection_list)
        except ValueError:
            raise GearmanError(
                "Only pass a single host to the constructor of %s" %
                type(self).__name__)

        self.current_handler = None
예제 #4
0
    def __init__(self, host_list=None, poll_timeout=DEFAULT_ADMIN_CLIENT_TIMEOUT):
        super(GearmanAdminClient, self).__init__(host_list=host_list)
        self.poll_timeout = poll_timeout

        self.current_connection = util.unlist(self.connection_list)
        self.current_handler = None