def startConsole(self, path, port=1):
"""
Import the php file/project AST from 'path' into the neo4j
database and start the neo4j console, using the 'SPAWN_SCRIPT' file.
"""
process = subprocess.call(
[
Configurator.getPath(Configurator.KEY_SPAWN_SCRIPT),
Configurator.getPath(Configurator.KEY_BASE_DIR) + "/config",
path, str(port),
"%d%s" % (Neo4jHelper.HEAP_SIZE[0],
Neo4jHelper.HEAP_SIZE[1])
],
preexec_fn=os.setsid
)
def signalHandler(signalnum, handler):
os.killpg(process.pid, signal.SIGINT)
signal.signal(signal.SIGINT, signalHandler)
signal.signal(signal.SIGTERM, signalHandler)
评论列表
文章目录