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:
16
seaman.py
16
seaman.py
@ -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)
|
||||
|
Reference in New Issue
Block a user