18 Commits

Author SHA1 Message Date
reivilibre
437961744c
Fix remove_stale_pushers job on SQLite. () 2021-09-20 10:26:13 +01:00
Andrew Morgan
3693ea61f5
Fix iteration in _remove_deleted_email_pushers background job. () 2021-09-01 09:13:01 +00:00
Azrenbeth
ad17fbd20e
Remove pushers when deleting 3pid from account ()
When a user deletes an email from their account it will
now also remove all pushers for that email and that user
(even if these pushers were created by a different client)
2021-08-26 13:53:57 +01:00
Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ()
Part of 

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
Patrick Cloke
b7748d3c00
Import HomeServer from the proper module. () 2021-03-23 07:12:48 -04:00
Erik Johnston
16f9f93eb7
Make deleting stale pushers a background update () 2021-03-03 12:08:16 +00:00
Erik Johnston
16108c579d
Fix SQL delta file taking a long time to run ()
Fixes 
2021-03-02 14:05:01 +00:00
Erik Johnston
1e62d9ee8c
Ensure pushers are deleted for deactivated accounts () 2021-02-25 13:56:55 +00:00
Eric Eastwood
0a00b7ff14
Update black, and run auto formatting over the codebase ()
- Update black version to the latest
 - Run black auto formatting over the codebase
    - Run autoformatting according to [`docs/code_style.md
`](80d6dc9783/docs/code_style.md)
 - Update `code_style.md` docs around installing black to use the correct version
2021-02-16 22:32:34 +00:00
Patrick Cloke
5b857b77f7
Don't error if deleting a non-existent pusher. () 2021-01-25 14:52:30 -05:00
Richard van der Hoff
2de7e263ed
Ensure we store pusher data as text ()
I don't think there's any need to use canonicaljson here.

Fixes: .
2021-01-15 16:57:23 +00:00
Patrick Cloke
bd30cfe86a
Convert internal pusher dicts to attrs classes. ()
This improves type hinting and should use less memory.
2020-12-16 11:25:30 -05:00
Richard van der Hoff
903d11c43a
Add DeferredCache.get_immediate method ()
* Add `DeferredCache.get_immediate` method

A bunch of things that are currently calling `DeferredCache.get` are only
really interested in the result if it's completed. We can optimise and simplify
this case.

* Remove unused 'default' parameter to DeferredCache.get()

* another get_immediate instance
2020-10-19 15:00:12 +01:00
Erik Johnston
cbabb312e0
Use async with for ID gens ()
This will allow us to hit the DB after we've finished using the generated stream ID.
2020-09-23 16:11:18 +01:00
Erik Johnston
2231dffee6
Make StreamIdGen get_next and get_next_mult async ()
This is mainly so that `StreamIdGenerator` and `MultiWriterIdGenerator`
will have the same interface, allowing them to be used interchangeably.
2020-08-25 15:10:08 +01:00
Patrick Cloke
b069b78bb4
Convert pusher databases to async/await. () 2020-08-14 10:30:16 -04:00
Patrick Cloke
894dae74fe
Convert misc database code to async () 2020-08-14 07:24:26 -04:00
Erik Johnston
a7bdf98d01
Rename database classes to make some sense () 2020-08-05 21:38:57 +01:00