Erik Johnston
1a1da60ad2
Fix new flake8 errors ( #7470 )
2020-05-12 11:20:48 +01:00
Richard van der Hoff
e48361545d
use an upsert to update device_lists_outbound_last_success
2020-05-06 11:41:23 +01:00
Richard van der Hoff
0f6ebf393d
Better type annotations for simple_upsert_txn
...
most of these params don't really need to be lists.
2020-05-06 11:41:23 +01:00
Richard van der Hoff
f31e65a749
bg update to clear out duplicate outbound_device_list_pokes ( #7193 )
...
We seem to have some duplicates, which could do with being cleared out.
2020-04-07 23:06:39 +01:00
Richard van der Hoff
39230d2171
Clean up some LoggingContext stuff ( #7120 )
...
* Pull Sentinel out of LoggingContext
... and drop a few unnecessary references to it
* Factor out LoggingContext.current_context
move `current_context` and `set_context` out to top-level functions.
Mostly this means that I can more easily trace what's actually referring to
LoggingContext, but I think it's generally neater.
* move copy-to-parent into `stop`
this really just makes `start` and `stop` more symetric. It also means that it
behaves correctly if you manually `set_log_context` rather than using the
context manager.
* Replace `LoggingContext.alive` with `finished`
Turn `alive` into `finished` and make it a bit better defined.
2020-03-24 14:45:33 +00:00
Brendan Abolivier
dc6fb56c5f
Hopefully mypy is happy now
2020-03-10 14:40:28 +00:00
Richard van der Hoff
132b673dbe
Add some type annotations in `synapse.storage` ( #6987 )
...
I cracked, and added some type definitions in synapse.storage.
2020-02-27 11:53:40 +00:00
Patrick Cloke
509e381afa
Clarify list/set/dict/tuple comprehensions and enforce via flake8 ( #6957 )
...
Ensure good comprehension hygiene using flake8-comprehensions.
2020-02-21 07:15:07 -05:00
Erik Johnston
7b7c3cedf2
Minor perf fixes to `get_auth_chain_ids`.
2020-02-19 15:47:11 +00:00
Michael Kaye
a831d2e4e3
Reduce performance logging to DEBUG ( #6833 )
...
* Reduce tnx performance logging to DEBUG
* Changelog.d
2020-02-05 08:57:37 +00:00
Erik Johnston
2284eb3a53
Add database config class ( #6513 )
...
This encapsulates config for a given database and is the way to get new
connections.
2019-12-18 10:45:12 +00:00
Erik Johnston
d537be1ebd
Pass Database into the data store
2019-12-06 15:49:44 +00:00
Erik Johnston
2ace775d88
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/make_database_class
2019-12-06 11:33:34 +00:00
Erik Johnston
e216ec381a
Remove unused var
2019-12-06 11:16:37 +00:00
Erik Johnston
4a33a6dd19
Move background update handling out of store
2019-12-05 11:11:26 +00:00
Erik Johnston
8863624f78
Comments
2019-12-05 10:46:37 +00:00
Erik Johnston
756d4942f5
Move DB pool and helper functions into dedicated Database class
2019-12-05 10:46:37 +00:00