mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 20:24:51 -04:00
Type tests.utils
(#13028)
* Cast to postgres types when handling postgres db * Remove unused method * Easy annotations * Annotate create_room * Use `ParamSpec` to annotate looping_call * Annotate `default_config` * Track `now` as a float `time_ms` returns an int like the proper Synapse `Clock` * Introduce a `Timer` dataclass * Introduce a Looper type * Suppress checking of a mock * tests.utils is typed * Changelog * Whoops, import ParamSpec from typing_extensions * ditch the psycopg2 casts
This commit is contained in:
parent
68695d8007
commit
6ba732fefe
5 changed files with 101 additions and 45 deletions
|
@ -109,7 +109,7 @@ GLOBAL_ROOT = ListNode["_Node"].create_root_node()
|
|||
|
||||
@wrap_as_background_process("LruCache._expire_old_entries")
|
||||
async def _expire_old_entries(
|
||||
clock: Clock, expiry_seconds: int, autotune_config: Optional[dict]
|
||||
clock: Clock, expiry_seconds: float, autotune_config: Optional[dict]
|
||||
) -> None:
|
||||
"""Walks the global cache list to find cache entries that haven't been
|
||||
accessed in the given number of seconds, or if a given memory threshold has been breached.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue