neo4j_helper.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:ccdetection 作者: tommiu 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号