From 6f912faddf8810d6849af46fcf66c0ed52fb324c Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Sun, 08 Jan 2017 20:54:57 +0000 Subject: [PATCH] Added originating-host flag --- trisurf/tsmgr.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/trisurf/tsmgr.py b/trisurf/tsmgr.py index 419c26b..281a2d5 100644 --- a/trisurf/tsmgr.py +++ b/trisurf/tsmgr.py @@ -55,6 +55,7 @@ parser.add_argument('-n', nargs='+', metavar='PROC_NO', type=int, help='OBSOLETE. Specifies process numbers.') parser.add_argument('-R','--raw',help='print status and the rest of the information in raw format', action="store_true") parser.add_argument('-x','--local-only',help='do not attempt to contact remote hosts. Run all operations only on local machine',action='store_true') + parser.add_argument('--originating-host',nargs=1,help='specify which host started the remote connections. Useful mainly fo internal functionaly of tsmgr and analyses.') args = parser.parse_args(arguments) return args @@ -305,7 +306,11 @@ remote_dir=host['remotebasepath'] else: remote_dir='trisurf_simulations' - output=host['_conn'].execute('python3 ./'+remote_dir+'/'+main.__file__+' -x '+" ".join(argv)) + #output=host['_conn'].execute('cd '+remote_dir) + #print(remote_dir) + #print(main.__file__) + #print('python3 '+main.__file__+' -x '+" ".join(argv)) + output=host['_conn'].execute('cd '+remote_dir+ '; python3 '+main.__file__+' -x --originating-host ' +socket.gethostname()+" ".join(argv)) for line in output: print(line.replace('\n','')) -- Gitblit v1.9.3