You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.3 KiB
27 lines
1.3 KiB
2 years ago
|
# -*- coding:utf-8 -*-
|
||
|
# @Time: 2023/8/22 15:30
|
||
|
# @Author:ZYP
|
||
|
# @File:word2vec_config.py
|
||
|
# @mail:zypsunshine1@gmail.com
|
||
|
# @Software: PyCharm
|
||
|
import logging
|
||
|
import logging.handlers
|
||
|
import os
|
||
|
import multiprocessing
|
||
|
import gevent.monkey
|
||
|
|
||
|
gevent.monkey.patch_all()
|
||
|
|
||
|
bind = '0.0.0.0:50001' # 绑定的ip已经端口号
|
||
|
chdir = '/home/zc-nlp-zyp/work_file/ssd_data/program/check_paper/check1/change_demo/word2vec' # gunicorn要切换到的目的工作目录
|
||
|
timeout = 60 # 超时
|
||
|
worker_class = 'gevent' # 使用gevent模式,还可以使用sync 模式,默认的是sync模式
|
||
|
workers = 4 # multiprocessing.cpu_count() * 2 + 1 # 启动的进程数
|
||
|
threads = 4
|
||
|
loglevel = "info" # 日志级别,这个日志级别指的是错误日志的级别,而访问日志的级别无法设置
|
||
|
access_log_format = '%(t)s %(p)s %(h)s "%(r)s" %(s)s %(L)s %(b)s %(f)s" "%(a)s"' # 设置gunicorn访问日志格式,错误日志无法设置
|
||
|
pidfile = "/home/zc-nlp-zyp/work_file/ssd_data/program/check_paper/check1/change_demo/word2vec/word2vec_log/gunicorn.pid"
|
||
|
accesslog = "/home/zc-nlp-zyp/work_file/ssd_data/program/check_paper/check1/change_demo/word2vec/word2vec_log/access.log"
|
||
|
errorlog = "/home/zc-nlp-zyp/work_file/ssd_data/program/check_paper/check1/change_demo/word2vec/word2vec_log/error.log"
|
||
|
daemon = True
|