Skip to content

Commit 45f97fc

Browse files
committed
revert: add subprocess handling for local model and conditional post handler execution
This reverts commit 8e3550e.
1 parent 2814e48 commit 45f97fc

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

apps/common/management/commands/services/services/local_model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ def cmd(self):
3636
'--max-requests-jitter', '2048',
3737
'--access-logformat', log_format,
3838
'--access-logfile', '/dev/null',
39-
'--error-logfile', '-',
40-
'-e', 'ENABLE_LOCAL_MODEL=1'
39+
'--error-logfile', '-'
4140
]
4241
if DEBUG:
4342
cmd.append('--reload')

apps/maxkb/wsgi.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ def post_scheduler_handler():
3030

3131
job.run()
3232

33-
# 仅在非local_model模式下启动后处理函数,dev celery scheduler 不需要
34-
if os.environ.get("ENABLE_LOCAL_MODEL") != '1':
35-
# 启动后处理函数
36-
post_handler()
33+
# 启动后处理函数
34+
post_handler()
3735

3836
# 仅在scheduler中启动定时任务,dev local_model celery 不需要
3937
if os.environ.get('ENABLE_SCHEDULER') == '1':

0 commit comments

Comments
 (0)