mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:44:52 -04:00
Allow setting of gc.set_thresholds
This commit is contained in:
parent
188f8d63e2
commit
dded389ac1
4 changed files with 38 additions and 6 deletions
|
@ -43,6 +43,7 @@ from twisted.web.resource import Resource
|
|||
|
||||
from daemonize import Daemonize
|
||||
|
||||
import gc
|
||||
import sys
|
||||
import logging
|
||||
|
||||
|
@ -342,6 +343,8 @@ def setup(config_options):
|
|||
ps.start_listening()
|
||||
|
||||
change_resource_limit(ps.config.soft_file_limit)
|
||||
if ps.config.gc_thresholds:
|
||||
gc.set_threshold(*ps.config.gc_thresholds)
|
||||
|
||||
def start():
|
||||
ps.replicate()
|
||||
|
@ -361,6 +364,8 @@ if __name__ == '__main__':
|
|||
def run():
|
||||
with LoggingContext("run"):
|
||||
change_resource_limit(ps.config.soft_file_limit)
|
||||
if ps.config.gc_thresholds:
|
||||
gc.set_threshold(*ps.config.gc_thresholds)
|
||||
reactor.run()
|
||||
|
||||
daemon = Daemonize(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue