Startup
This commit is contained in:
+6
-2
@@ -306,6 +306,7 @@ if get_context().isServerEnabled():
|
||||
|
||||
#Managing local camtool server
|
||||
CAMTOOL_SERVER_SCRIPT = "camtool_pshell" #"cam_server"
|
||||
PRINT_CAMTOOL_OUTPUT = True #When process quit
|
||||
|
||||
def _get_camtool_port():
|
||||
return camtool.url[camtool.url.rfind(":")+1:]
|
||||
@@ -326,7 +327,10 @@ def kill_camtool():
|
||||
def _run_camtool():
|
||||
try:
|
||||
#cmd = "source /opt/gfa/python\n"
|
||||
cmd = CAMTOOL_SERVER_SCRIPT + " -p " + _get_camtool_port() + " -b /afs/psi.ch/intranet/SF/Applications/config/camtool_n > /dev/null &"
|
||||
cmd = CAMTOOL_SERVER_SCRIPT + " -p " + _get_camtool_port() + " -b /afs/psi.ch/intranet/SF/Applications/config/camtool_n"
|
||||
if not PRINT_CAMTOOL_OUTPUT:
|
||||
cmd = cmd + " > /dev/null 2>&1"
|
||||
print "Executing: ", cmd
|
||||
print exec_cmd(cmd)
|
||||
except:
|
||||
import traceback
|
||||
@@ -343,7 +347,7 @@ def check_camtool():
|
||||
while not is_camtool_running():
|
||||
if time.time() - start > 2.0:
|
||||
raise Exception("Error starting camtool process")
|
||||
time.sleep(0.1)
|
||||
time.sleep(0.5)
|
||||
|
||||
def bsget(channel):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user