fix: ensure worker count is properly converted to integer for max_requests
parent
a8dc1e00d4
commit
fe7d75d720
|
|
@ -27,7 +27,7 @@ class GunicornLocalModelService(BaseService):
|
||||||
log_format = '%(h)s %(t)s %(L)ss "%(r)s" %(s)s %(b)s '
|
log_format = '%(h)s %(t)s %(L)ss "%(r)s" %(s)s %(b)s '
|
||||||
bind = f'{CONFIG.get("LOCAL_MODEL_HOST")}:{CONFIG.get("LOCAL_MODEL_PORT")}'
|
bind = f'{CONFIG.get("LOCAL_MODEL_HOST")}:{CONFIG.get("LOCAL_MODEL_PORT")}'
|
||||||
worker = CONFIG.get("LOCAL_MODEL_HOST_WORKER", 1)
|
worker = CONFIG.get("LOCAL_MODEL_HOST_WORKER", 1)
|
||||||
max_requests = 10240 if worker > 1 else 0
|
max_requests = 10240 if int(worker) > 1 else 0
|
||||||
cmd = [
|
cmd = [
|
||||||
'gunicorn', 'maxkb.wsgi:application',
|
'gunicorn', 'maxkb.wsgi:application',
|
||||||
'-b', bind,
|
'-b', bind,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue