Show More
@@ -466,7 +466,7 b' class Client(HasTraits):' | |||||
466 | self.session = Session(**extra_args) |
|
466 | self.session = Session(**extra_args) | |
467 |
|
467 | |||
468 | self._query_socket = self._context.socket(zmq.DEALER) |
|
468 | self._query_socket = self._context.socket(zmq.DEALER) | |
469 | self._query_socket.setsockopt(zmq.IDENTITY, self.session.bsession) |
|
469 | ||
470 | if self._ssh: |
|
470 | if self._ssh: | |
471 | tunnel.tunnel_connection(self._query_socket, url, sshserver, **ssh_kwargs) |
|
471 | tunnel.tunnel_connection(self._query_socket, url, sshserver, **ssh_kwargs) | |
472 | else: |
|
472 | else: | |
@@ -607,29 +607,21 b' class Client(HasTraits):' | |||||
607 | ident = self.session.bsession |
|
607 | ident = self.session.bsession | |
608 | if content.mux: |
|
608 | if content.mux: | |
609 | self._mux_socket = self._context.socket(zmq.DEALER) |
|
609 | self._mux_socket = self._context.socket(zmq.DEALER) | |
610 | self._mux_socket.setsockopt(zmq.IDENTITY, ident) |
|
|||
611 | connect_socket(self._mux_socket, content.mux) |
|
610 | connect_socket(self._mux_socket, content.mux) | |
612 | if content.task: |
|
611 | if content.task: | |
613 | self._task_scheme, task_addr = content.task |
|
612 | self._task_scheme, task_addr = content.task | |
614 | self._task_socket = self._context.socket(zmq.DEALER) |
|
613 | self._task_socket = self._context.socket(zmq.DEALER) | |
615 | self._task_socket.setsockopt(zmq.IDENTITY, ident) |
|
|||
616 | connect_socket(self._task_socket, task_addr) |
|
614 | connect_socket(self._task_socket, task_addr) | |
617 | if content.notification: |
|
615 | if content.notification: | |
618 | self._notification_socket = self._context.socket(zmq.SUB) |
|
616 | self._notification_socket = self._context.socket(zmq.SUB) | |
619 | connect_socket(self._notification_socket, content.notification) |
|
617 | connect_socket(self._notification_socket, content.notification) | |
620 | self._notification_socket.setsockopt(zmq.SUBSCRIBE, b'') |
|
618 | self._notification_socket.setsockopt(zmq.SUBSCRIBE, b'') | |
621 | # if content.query: |
|
|||
622 | # self._query_socket = self._context.socket(zmq.DEALER) |
|
|||
623 | # self._query_socket.setsockopt(zmq.IDENTITY, self.session.bsession) |
|
|||
624 | # connect_socket(self._query_socket, content.query) |
|
|||
625 | if content.control: |
|
619 | if content.control: | |
626 | self._control_socket = self._context.socket(zmq.DEALER) |
|
620 | self._control_socket = self._context.socket(zmq.DEALER) | |
627 | self._control_socket.setsockopt(zmq.IDENTITY, ident) |
|
|||
628 | connect_socket(self._control_socket, content.control) |
|
621 | connect_socket(self._control_socket, content.control) | |
629 | if content.iopub: |
|
622 | if content.iopub: | |
630 | self._iopub_socket = self._context.socket(zmq.SUB) |
|
623 | self._iopub_socket = self._context.socket(zmq.SUB) | |
631 | self._iopub_socket.setsockopt(zmq.SUBSCRIBE, b'') |
|
624 | self._iopub_socket.setsockopt(zmq.SUBSCRIBE, b'') | |
632 | self._iopub_socket.setsockopt(zmq.IDENTITY, ident) |
|
|||
633 | connect_socket(self._iopub_socket, content.iopub) |
|
625 | connect_socket(self._iopub_socket, content.iopub) | |
634 | self._update_engines(dict(content.engines)) |
|
626 | self._update_engines(dict(content.engines)) | |
635 | else: |
|
627 | else: |
@@ -585,7 +585,7 b' class Hub(SessionFactory):' | |||||
585 | self.log.info("queue::client %r submitted request %r to %s", client_id, msg_id, eid) |
|
585 | self.log.info("queue::client %r submitted request %r to %s", client_id, msg_id, eid) | |
586 | # Unicode in records |
|
586 | # Unicode in records | |
587 | record['engine_uuid'] = queue_id.decode('ascii') |
|
587 | record['engine_uuid'] = queue_id.decode('ascii') | |
588 |
record['client_uuid'] = |
|
588 | record['client_uuid'] = msg['header']['session'] | |
589 | record['queue'] = 'mux' |
|
589 | record['queue'] = 'mux' | |
590 |
|
590 | |||
591 | try: |
|
591 | try: | |
@@ -677,7 +677,7 b' class Hub(SessionFactory):' | |||||
677 | return |
|
677 | return | |
678 | record = init_record(msg) |
|
678 | record = init_record(msg) | |
679 |
|
679 | |||
680 |
record['client_uuid'] = |
|
680 | record['client_uuid'] = msg['header']['session'] | |
681 | record['queue'] = 'task' |
|
681 | record['queue'] = 'task' | |
682 | header = msg['header'] |
|
682 | header = msg['header'] | |
683 | msg_id = header['msg_id'] |
|
683 | msg_id = header['msg_id'] | |
@@ -1205,6 +1205,7 b' class Hub(SessionFactory):' | |||||
1205 | self.db.add_record(msg_id, init_record(msg)) |
|
1205 | self.db.add_record(msg_id, init_record(msg)) | |
1206 | except Exception: |
|
1206 | except Exception: | |
1207 | self.log.error("db::DB Error updating record: %s", msg_id, exc_info=True) |
|
1207 | self.log.error("db::DB Error updating record: %s", msg_id, exc_info=True) | |
|
1208 | return finish(error.wrap_exception()) | |||
1208 |
|
1209 | |||
1209 | finish(dict(status='ok', resubmitted=resubmitted)) |
|
1210 | finish(dict(status='ok', resubmitted=resubmitted)) | |
1210 |
|
1211 |
General Comments 0
You need to be logged in to leave comments.
Login now