File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
common/management/commands/services/services Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ def cmd(self):
3636 '--max-requests-jitter' , '2048' ,
3737 '--access-logformat' , log_format ,
3838 '--access-logfile' , '/dev/null' ,
39- '--error-logfile' , '-'
39+ '--error-logfile' , '-' ,
40+ '-e' , 'ENABLE_LOCAL_MODEL=1'
4041 ]
4142 if DEBUG :
4243 cmd .append ('--reload' )
Original file line number Diff line number Diff line change @@ -30,8 +30,10 @@ def post_scheduler_handler():
3030
3131 job .run ()
3232
33- # 启动后处理函数
34- post_handler ()
33+ # 仅在非local_model模式下启动后处理函数,dev celery scheduler 不需要
34+ if os .environ .get ("ENABLE_LOCAL_MODEL" ) != '1' :
35+ # 启动后处理函数
36+ post_handler ()
3537
3638# 仅在scheduler中启动定时任务,dev local_model celery 不需要
3739if os .environ .get ('ENABLE_SCHEDULER' ) == '1' :
You can’t perform that action at this time.
0 commit comments