Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove log_function and its uses #11761

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/11761.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove `log_function` utility function and its uses.
5 changes: 0 additions & 5 deletions synapse/federation/federation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
from synapse.events import EventBase, builder
from synapse.federation.federation_base import FederationBase, event_from_pdu_json
from synapse.federation.transport.client import SendJoinResponse
from synapse.logging.utils import log_function
from synapse.types import JsonDict, get_domain_from_id
from synapse.util.async_helpers import concurrently_execute
from synapse.util.caches.expiringcache import ExpiringCache
Expand Down Expand Up @@ -144,7 +143,6 @@ def _clear_tried_cache(self) -> None:
if destination_dict:
self.pdu_destination_tried[event_id] = destination_dict

@log_function
async def make_query(
self,
destination: str,
Expand Down Expand Up @@ -178,7 +176,6 @@ async def make_query(
ignore_backoff=ignore_backoff,
)

@log_function
async def query_client_keys(
self, destination: str, content: JsonDict, timeout: int
) -> JsonDict:
Expand All @@ -196,7 +193,6 @@ async def query_client_keys(
destination, content, timeout
)

@log_function
async def query_user_devices(
self, destination: str, user_id: str, timeout: int = 30000
) -> JsonDict:
Expand All @@ -208,7 +204,6 @@ async def query_user_devices(
destination, user_id, timeout
)

@log_function
async def claim_client_keys(
self, destination: str, content: JsonDict, timeout: int
) -> JsonDict:
Expand Down
3 changes: 0 additions & 3 deletions synapse/federation/federation_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
run_in_background,
)
from synapse.logging.opentracing import log_kv, start_active_span_from_edu, trace
from synapse.logging.utils import log_function
from synapse.metrics.background_process_metrics import wrap_as_background_process
from synapse.replication.http.federation import (
ReplicationFederationSendEduRestServlet,
Expand Down Expand Up @@ -859,7 +858,6 @@ async def on_event_auth(
res = {"auth_chain": [a.get_pdu_json(time_now) for a in auth_pdus]}
return 200, res

@log_function
async def on_query_client_keys(
self, origin: str, content: Dict[str, str]
) -> Tuple[int, Dict[str, Any]]:
Expand Down Expand Up @@ -940,7 +938,6 @@ async def on_get_missing_events(

return {"events": [ev.get_pdu_json(time_now) for ev in missing_events]}

@log_function
async def on_openid_userinfo(self, token: str) -> Optional[str]:
ts_now_ms = self._clock.time_msec()
return await self.store.get_user_id_for_open_id_token(token, ts_now_ms)
Expand Down
3 changes: 0 additions & 3 deletions synapse/federation/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from typing import Optional, Tuple

from synapse.federation.units import Transaction
from synapse.logging.utils import log_function
from synapse.storage.databases.main import DataStore
from synapse.types import JsonDict

Expand All @@ -36,7 +35,6 @@ class TransactionActions:
def __init__(self, datastore: DataStore):
self.store = datastore

@log_function
async def have_responded(
self, origin: str, transaction: Transaction
) -> Optional[Tuple[int, JsonDict]]:
Expand All @@ -53,7 +51,6 @@ async def have_responded(

return await self.store.get_received_txn_response(transaction_id, origin)

@log_function
async def set_response(
self, origin: str, transaction: Transaction, code: int, response: JsonDict
) -> None:
Expand Down
Loading