Commit 9fba9ffb authored by haoyanbin's avatar haoyanbin

1

parent 038b69af
FROM python:3.8
WORKDIR /
WORKDIR /app
RUN python -m pip install --upgrade pip -i https://pypi.python.org/simple
ADD ./ /app
RUN python -m pip install --upgrade pip
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY . .
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
# CMD ["gunicorn", "start:app", "-c", "./gunicorn.conf.py"]
CMD ["python", "start.py"]
\ No newline at end of file
......@@ -249,7 +249,6 @@ def data_keyword_clinical():
@bp.route('/neo_treatment_medicinal')
def neo_treatment_medicinal():
graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -280,7 +279,6 @@ def neo_treatment_medicinal():
@bp.route('/neo_illness_treatment')
def neo_illness_treatment():
graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -312,7 +310,6 @@ def neo_illness_treatment():
@bp.route('/neo_illness_symptoms')
def neo_illness_symptoms():
# graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -660,7 +657,6 @@ def test2():
@bp.route('/neo_biochemical')
def neo_biochemical():
graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -693,7 +689,6 @@ def neo_biochemical():
@bp.route('/neo_prestext')
def neo_prestext():
graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -717,7 +712,6 @@ def neo_prestext():
@bp.route('/neo_pres')
def neo_pres():
graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -742,7 +736,6 @@ def neo_pres():
@bp.route('/neo_cate2')
def neo_cate2():
graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -797,7 +790,6 @@ def neo_cate2():
@bp.route('/neo_cate')
def neo_cate():
graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -939,7 +931,6 @@ def data_clinicalid():
@bp.route('/neo_clinical')
def neo_clinical():
graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -981,7 +972,6 @@ def neo_clinical():
@bp.route('/neo_drug')
def neo_drug():
graph = Graph("", auth=("neo4j", "11111111"))
node_matcher = NodeMatcher(graph)
......@@ -1057,29 +1047,6 @@ def neo_drug():
@bp.route('/c')
def test():
# test_graph = Graph("", auth=("neo4j", "11111111"))
# node_matcher = NodeMatcher(test_graph)
#
# case = node_matcher.match('人', name='小绿').first() # 获得name为XXX刑事判决文书的“判决文书”类 节点
# people = node_matcher.match('人', name='小红').first() # 获得name为“XXX”的“被告人”类节点
# relation = Relationship(case, '爱', people) # 创建判决文书和被告人间的关系,关系词为“被告人”
# test_graph.create(relation) # 将创建传递到图上
# 建立节点
# test_node_1 = Node("人", id=2)
# test_node_2 = Node("人", id=1)
# test_graph.create(test_node_1)
# test_graph.create(test_node_2)
# test_node_1.add_label("teacher")
# 建立关系
# node_1_call_node_2 = Relationship(test_node_1, '喜欢', test_node_2)
# # node_1_call_node_2['count'] = 1
# node_2_call_node_1 = Relationship(test_node_2, '讨厌', test_node_1)
# # node_2_call_node_1['count'] = 2
# test_graph.create(node_1_call_node_2)
# test_graph.create(node_2_call_node_1)
# return "1"
# 建立与ClickHouse数据库的连接
conn = Client(
......@@ -1102,7 +1069,6 @@ def test():
# gen_name,indication,useto,usage,unreactions = row
# print(gen_name,indication,useto,usage,unreactions)
# graph = Graph("", auth=("neo4j", "11111111"))
#
# nodes = graph.nodes.match()
......
......@@ -20,4 +20,4 @@ dbconn2 = MYSQL(
)
graph = Graph("", auth=("neo4j", "11111111"))
graph = Graph("bolt://gds-2zeyv40mi12s6mjc149870pub.graphdb.rds.aliyuncs.com:3734", auth=("dbc_tair", "dbc_tair888888"))
workers = 5 # 定义同时开启的处理请求的进程数量,根据网站流量适当调整
worker_class = "gevent" # 采用gevent库,支持异步处理请求,提高吞吐量
bind = "0.0.0.0:5080"
\ No newline at end of file
bind = "0.0.0.0:5000"
\ No newline at end of file
......@@ -3,4 +3,4 @@ from app import create_app
app = create_app()
if __name__ == '__main__':
app.run(port=5080)
app.run(port=5080, debug=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment