revert: add subprocess handling for local model and conditional post handler execution
This reverts commit 8e3550eb83.
v3.2
parent
26a3067992
commit
ddc60dd1c3
|
|
@ -36,8 +36,7 @@ class GunicornLocalModelService(BaseService):
|
||||||
'--max-requests-jitter', '2048',
|
'--max-requests-jitter', '2048',
|
||||||
'--access-logformat', log_format,
|
'--access-logformat', log_format,
|
||||||
'--access-logfile', '/dev/null',
|
'--access-logfile', '/dev/null',
|
||||||
'--error-logfile', '-',
|
'--error-logfile', '-'
|
||||||
'-e', 'ENABLE_LOCAL_MODEL=1'
|
|
||||||
]
|
]
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
cmd.append('--reload')
|
cmd.append('--reload')
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,8 @@ def post_scheduler_handler():
|
||||||
|
|
||||||
job.run()
|
job.run()
|
||||||
|
|
||||||
# 仅在非local_model模式下启动后处理函数,dev celery scheduler 不需要
|
# 启动后处理函数
|
||||||
if os.environ.get("ENABLE_LOCAL_MODEL") != '1':
|
post_handler()
|
||||||
# 启动后处理函数
|
|
||||||
post_handler()
|
|
||||||
|
|
||||||
# 仅在scheduler中启动定时任务,dev local_model celery 不需要
|
# 仅在scheduler中启动定时任务,dev local_model celery 不需要
|
||||||
if os.environ.get('ENABLE_SCHEDULER') == '1':
|
if os.environ.get('ENABLE_SCHEDULER') == '1':
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue