diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-07 16:26:25 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-07 16:26:25 +0100 |
commit | 2d1d1025fac846e2746dc627c0ebb6542c1488d3 (patch) | |
tree | 22161a745ea1012df9ae3bdbefa67f37450d0531 /synapse/app/pusher.py | |
parent | Allow setting of gc.set_thresholds (diff) | |
download | synapse-2d1d1025fac846e2746dc627c0ebb6542c1488d3.tar.xz |
Add gc_threshold to pusher and synchrotron
Diffstat (limited to 'synapse/app/pusher.py')
-rw-r--r-- | synapse/app/pusher.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/synapse/app/pusher.py b/synapse/app/pusher.py index 7e2bf7ecc2..4ec23d84c1 100644 --- a/synapse/app/pusher.py +++ b/synapse/app/pusher.py @@ -65,6 +65,20 @@ class SlaveConfig(DatabaseConfig): self.pid_file = self.abspath(config.get("pid_file")) self.public_baseurl = config["public_baseurl"] + thresholds = config.get("gc_thresholds", None) + if thresholds is not None: + try: + assert len(thresholds) == 3 + self.gc_thresholds = ( + int(thresholds[0]), int(thresholds[1]), int(thresholds[2]), + ) + except: + raise ConfigError( + "Value of `gc_threshold` must be a list of three integers if set" + ) + else: + self.gc_thresholds = None + # some things used by the auth handler but not actually used in the # pusher codebase self.bcrypt_rounds = None |