improve service manager

- do not start sea server automatically
- replace _SERVICE in FRAPPY_HISTORY by service name
- imporve error messages
- no fiddling around with sys,path, reply on PYTHONPATH for
  finding packages
This commit is contained in:
l_samenv
2021-03-15 15:11:16 +01:00
parent adbe97361f
commit 702db45a76
9 changed files with 26 additions and 49 deletions

View File

@ -58,7 +58,7 @@ class SeaManager(ServiceManager):
sea stop <instance> [<service>]
sea list [<instance>]
<service> is one of main, stick, addons
<service> is one of sea, graph
<instance> is one of %s
"""
@ -66,22 +66,20 @@ class SeaManager(ServiceManager):
try:
self.check_running(ins, 'sea')
except ServiceDown as e:
print('%s, try to start...' % e)
self.do_start(ins)
time.sleep(1) # make sure caller did read the message
self.usage()
print(str(e))
except KeyError: # running on an other machine?
pass
self.usage()
run_command('six -sea %s' % ins, wait=True)
def do_gui(self, ins=''):
try:
self.check_running(ins, 'sea')
except ServiceDown as e:
print('%s, try to start...' % e)
self.do_start(ins)
time.sleep(1) # make sure caller did read the message
self.usage()
print(str(e))
except KeyError: # running on an other machine?
pass
self.usage()
run_command('SeaClient %s' % ins)
print('starting sea gui %s' % ins)
time.sleep(5)