Skip to content

Commit

Permalink
修复bug,更新代码
Browse files Browse the repository at this point in the history
  • Loading branch information
pencil1 committed Sep 6, 2022
1 parent 06e6d39 commit bfd1ab7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
8 changes: 5 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ class DevelopmentConfig(Config):


class ProductionConfig(Config):
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:78929709@122.51.184.120:3306/api_test?charset=utf8mb4' # 123456表示密码,test代表数据库名称
# SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:Password123@mysql@10.100.2.45:3307/api_test' # 123456表示密码,test代表数据库名称
# SCHEDULER_JOBSTORES = {'default': SQLAlchemyJobStore(url=SQLALCHEMY_DATABASE_URI,
# engine_options={'pool_pre_ping': True})}

Expand All @@ -140,7 +142,7 @@ class ProductionConfig(Config):

config = {

'default': DevelopmentConfig,
# 'default': ProductionConfig,
'Production': ProductionConfig,
# 'default': DevelopmentConfig,
'default': ProductionConfig,
# 'Production': ProductionConfig,
}
2 changes: 1 addition & 1 deletion gunicorn_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# gevent的猴子魔法 变成非阻塞
gevent.monkey.patch_all()

bind = '172.20.0.2:8091'
bind = '172.17.0.16:8091'

# 启动的进程数
# workers = multiprocessing.cpu_count() * 2 + 1
Expand Down
4 changes: 2 additions & 2 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
error_log /usr/local/nginx/logs/error.log warn;
pid /usr/local/nginx/logs/nginx.pid;


events {
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ idna==2.10
itsdangerous==1.1.0
Jinja2==2.11.2
jmespath==0.10.0
json5==0.9.8
Mako==1.1.3
MarkupSafe==1.1.1
Naked==0.1.31
Expand Down

0 comments on commit bfd1ab7

Please sign in to comment.