add FrappyManager.run + make work on linse-a
This commit is contained in:
@@ -100,6 +100,8 @@ class Config:
|
||||
configfile = Path('/sq_sw/linse/etc/linsetools.cfg')
|
||||
self.sections = read_config(configfile)
|
||||
instconfig = Path('/home/linse/.config/instrument.cfg')
|
||||
if not instconfig.is_file():
|
||||
instconfig = Path('/home/l_samenv/.config/instrument.cfg')
|
||||
if instconfig.is_file():
|
||||
self.instruments = read_config(instconfig)
|
||||
else:
|
||||
@@ -193,7 +195,7 @@ def wait_status(cl, service):
|
||||
class MarcheControl:
|
||||
port = 8124
|
||||
otherarg = None
|
||||
argmap = {k: 'action' for k in ('start', 'restart', 'stop', 'gui', 'cli', 'list', 'listcfg')}
|
||||
argmap = {k: 'action' for k in ('start', 'restart', 'stop', 'gui', 'run', 'cli', 'list', 'listcfg')}
|
||||
|
||||
def __init__(self, instrument=None, host='localhost', port=None, user=None, config=None):
|
||||
self.config = config or Config()
|
||||
|
||||
@@ -271,6 +271,9 @@ class FrappyControl(MarcheControl):
|
||||
if ambiguous:
|
||||
prt(f'{gap} ! {len(ambiguous)} ambiguous mappings sea -> frappy')
|
||||
|
||||
def run(self, cfg):
|
||||
os.system(f'/sq_sw/linse/bin/frappy-server sinq {cfg}')
|
||||
|
||||
def do(self, action=None, service=None, cfg=None):
|
||||
if action == 'start':
|
||||
self.add_frappy_service(service, cfg, None)
|
||||
@@ -287,5 +290,7 @@ class FrappyControl(MarcheControl):
|
||||
self.gui()
|
||||
elif action in ('cli', None):
|
||||
self.cli()
|
||||
elif action in ('run', None):
|
||||
self.run(cfg)
|
||||
else:
|
||||
raise ArgError(f'unknown action {action!r}')
|
||||
|
||||
Reference in New Issue
Block a user