diff --git a/pyproject.toml b/pyproject.toml index c8d9629..807068c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "PGCacheWatch" description = "A Python library for real-time PostgreSQL event-driven cache invalidation, leveraging existing database infrastructure" readme = "README.md" requires-python = ">=3.10" -version = "0.0.4" +version = "0.0.5" license = { text = "Apache 2.0" } authors = [{ name = "janbjorge"}] diff --git a/src/pgcachewatch/listeners.py b/src/pgcachewatch/listeners.py index eb911f0..791e08e 100644 --- a/src/pgcachewatch/listeners.py +++ b/src/pgcachewatch/listeners.py @@ -8,7 +8,7 @@ from . import models -def _critical_termination_listener() -> None: +def _critical_termination_listener(*_: object, **__: object) -> None: # Must be defined in the global namespace, as ayncpg keeps # a set of functions to call. This this will now happen once as # all instance will point to the same function. @@ -61,7 +61,7 @@ async def create( max_latency=max_latency, _called_by_create=True, ) - me._pg_connection.add_termination_listener(_critical_termination_listener) # type: ignore[arg-type] + me._pg_connection.add_termination_listener(_critical_termination_listener) await me._pg_connection.add_listener(me._pg_channel, me.parse_and_put) # type: ignore[arg-type] return me