Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
feat(parser): add ctrl_with_ipc to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Oct 15, 2019
1 parent 38147fe commit 02941b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gnes/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ def set_service_parser(parser=None):
parser.add_argument('--squeeze_pb', action=ActionNoYes, default=True,
help='sending bytes and ndarray separately apart from the protobuf message, '
'usually yields better network efficiency')
parser.add_argument('--ctrl_with_ipc', action='store_true', default=False,
help='use ipc protocol for control socket')
return parser


Expand Down
2 changes: 1 addition & 1 deletion gnes/service/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def __init__(self, args):
self.last_dump_time = time.perf_counter()
self._model = None
self.use_event_loop = True
self.ctrl_with_ipc = (os.name != 'nt')
self.ctrl_with_ipc = (os.name != 'nt') and self.args.ctrl_with_ipc
if self.ctrl_with_ipc:
self.ctrl_addr = get_random_ipc()
else:
Expand Down

0 comments on commit 02941b6

Please sign in to comment.