Sean Quah
5305a5e881
Type hint the constructors of the data store classes ( #11555 )
2021-12-13 17:05:00 +00:00
Sean Quah
2b82ec425f
Add type hints for most HomeServer
parameters ( #11095 )
2021-10-22 18:15:41 +01:00
Jonathan de Jong
bf72d10dbf
Use inline type hints in various other places (in synapse/
) ( #10380 )
2021-07-15 11:02:43 +01:00
Richard van der Hoff
c0df6bae06
Remove keylen
from LruCache
. ( #9993 )
...
`keylen` seems to be a thing that is frequently incorrectly set, and we don't really need it.
The only time it was used was to figure out if we had removed a subtree in `del_multi`, which we can do better by changing `TreeCache.pop` to return a different type (`TreeCacheNode`).
Commits should be independently reviewable.
2021-05-24 14:02:01 +01:00
Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ( #9786 )
...
Part of #9744
Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now.
`Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
2021-04-14 15:34:27 +01:00
Richard van der Hoff
97647b33c2
Replace DeferredCache with LruCache where possible ( #8563 )
...
Most of these uses don't need a full-blown DeferredCache; LruCache is lighter and more appropriate.
2020-10-19 12:20:29 +01:00
Richard van der Hoff
4182bb812f
move DeferredCache into its own module
2020-10-14 23:38:14 +01:00
Richard van der Hoff
9f87da0a84
Rename Cache->DeferredCache
2020-10-14 23:38:14 +01:00
Richard van der Hoff
7eff59ec91
Add some more type annotations to Cache
2020-10-14 23:38:14 +01:00
Patrick Cloke
8a4a4186de
Simplify super() calls to Python 3 syntax. ( #8344 )
...
This converts calls like super(Foo, self) -> super().
Generated with:
sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
2020-09-18 09:56:44 -04:00
Patrick Cloke
d4a7829b12
Convert synapse.api to async/await ( #8031 )
2020-08-06 08:30:06 -04:00
Erik Johnston
a7bdf98d01
Rename database classes to make some sense ( #8033 )
2020-08-05 21:38:57 +01:00
Amber Brown
7cb8b4bc67
Allow configuration of Synapse's cache without using synctl or environment variables ( #6391 )
2020-05-11 18:45:23 +01:00
Erik Johnston
9a4fb457cf
Change DataStores to accept 'database' param.
2019-12-06 13:30:06 +00:00
Erik Johnston
c66a06ac6b
Move storage classes into a main "data store".
...
This is in preparation for having multiple data stores that offer
different functionality, e.g. splitting out state or event storage.
2019-10-21 16:05:06 +01:00
Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
2019-06-20 19:32:02 +10:00
Erik Johnston
face0c5b3c
Prefill client IPs cache on workers
2019-03-06 17:39:32 +00:00
Amber Brown
49af402019
run isort
2018-07-09 16:09:20 +10:00
Erik Johnston
8c23221666
Fix up
2017-06-27 15:53:45 +01:00
Erik Johnston
78cefd78d6
Make workers report to master for user ip updates
2017-06-27 14:58:10 +01:00