mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: never restart scheduler worker if worker=1.
This commit is contained in:
parent
1600160f4f
commit
a1507c1e44
|
|
@ -18,13 +18,14 @@ class SchedulerService(BaseService):
|
|||
|
||||
log_format = '%(h)s %(t)s %(L)ss "%(r)s" %(s)s %(b)s '
|
||||
bind = f'127.0.0.1:6060'
|
||||
max_requests = 10240 if self.worker > 1 else 0
|
||||
cmd = [
|
||||
'gunicorn', 'maxkb.wsgi:application',
|
||||
'-b', bind,
|
||||
'-k', 'gthread',
|
||||
'--threads', '200',
|
||||
'-w', str(self.worker),
|
||||
'--max-requests', '10240',
|
||||
'--max-requests', str(max_requests),
|
||||
'--max-requests-jitter', '2048',
|
||||
'--access-logformat', log_format,
|
||||
'--access-logfile', '/dev/null',
|
||||
|
|
|
|||
Loading…
Reference in New Issue