diff options
author | Daniel Dent <DanielDent@users.noreply.github.com> | 2016-11-12 00:10:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-12 00:10:23 -0800 |
commit | 1c93cd9f9fc393b096790adf23336326dd6737cc (patch) | |
tree | bb0fb6c432bb545bd5f486709776457b5f05115c | |
parent | Merge branch 'erikj/ldap3_auth' (diff) | |
download | synapse-1c93cd9f9fc393b096790adf23336326dd6737cc.tar.xz |
Add support for durations in minutes
-rw-r--r-- | synapse/config/_base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py index af9f17bf7b..1ab5593c6e 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -64,11 +64,12 @@ class Config(object): if isinstance(value, int) or isinstance(value, long): return value second = 1000 - hour = 60 * 60 * second + minute = 60 * second + hour = 60 * minute day = 24 * hour week = 7 * day year = 365 * day - sizes = {"s": second, "h": hour, "d": day, "w": week, "y": year} + sizes = {"s": second, "m": minute, "h": hour, "d": day, "w": week, "y": year} size = 1 suffix = value[-1] if suffix in sizes: |