comparison runXena.py @ 33:7ceb967147c3

start xena with no gui add library files
author jingchunzhu <jingchunzhu@gmail.com>
date Wed, 22 Jul 2015 13:24:44 -0700
parents 63b1ba1e3424
children a3fbe077a14c
comparison
equal deleted inserted replaced
32:63b1ba1e3424 33:7ceb967147c3
9 import subprocess, shlex 9 import subprocess, shlex
10 import sys 10 import sys
11 import time 11 import time
12 import traceback 12 import traceback
13 import xena_utils as xena 13 import xena_utils as xena
14
15 dirname = os.path.dirname(os.path.abspath(sys.argv[0]))
16
17 sys.path.insert(0, dirname + "/lockfile-0.10.2/")
18 sys.path.insert(0, dirname + "/python-daemon-2.0.5/")
19
14 20
15 #third party libs 21 #third party libs
16 from daemon import runner 22 from daemon import runner
17 from lockfile import LockTimeout 23 from lockfile import LockTimeout
18 24
32 38
33 def run(self): 39 def run(self):
34 while True: 40 while True:
35 #Main code goes here ... 41 #Main code goes here ...
36 #Note that logger level needs to be set to logging.DEBUG before this shows up in the logs 42 #Note that logger level needs to be set to logging.DEBUG before this shows up in the logs
37 xenaCmdline = "java -jar %s -r %s/files -d %s/db -t %s/tmp --logfile %s/xena.log -p %s -H 0.0.0.0" 43 xenaCmdline = "java -jar %s -r %s/files -d %s/db -t %s/tmp --no-gui --logfile %s/xena.log -p %s -H 0.0.0.0"
38 xenaBaseDir = xena.baseDir() 44 xenaBaseDir = xena.baseDir()
39 xenaCmd = xenaCmdline % (xena.jarPath(), xenaBaseDir, 45 xenaCmd = xenaCmdline % (xena.jarPath(), xenaBaseDir,
40 xenaBaseDir, xenaBaseDir, 46 xenaBaseDir, xenaBaseDir,
41 xenaBaseDir, xena.port()) 47 xenaBaseDir, xena.port())
42 logger.debug("Invoking Xena VM with command %s" % (xenaCmd)) 48 logger.debug("Invoking Xena VM with command %s" % (xenaCmd))