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

Commit

Permalink
isort
Browse files Browse the repository at this point in the history
  • Loading branch information
JorikSchellekens committed Aug 16, 2019
1 parent d0d8cfe commit 030f807
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
7 changes: 3 additions & 4 deletions synapse/federation/federation_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from synapse.federation.units import Edu, Transaction
from synapse.http.endpoint import parse_server_name
from synapse.logging.context import nested_logging_context
from synapse.logging.opentracing import log_kv, trace
from synapse.logging.utils import log_function
from synapse.replication.http.federation import (
ReplicationFederationSendEduRestServlet,
Expand Down Expand Up @@ -507,7 +508,7 @@ def on_query_client_keys(self, origin, content):
def on_query_user_devices(self, origin, user_id):
return self.on_query_request("user_devices", user_id)

@opentracing.trace
@trace
@defer.inlineCallbacks
@log_function
def on_claim_client_keys(self, origin, content):
Expand All @@ -516,9 +517,7 @@ def on_claim_client_keys(self, origin, content):
for device_id, algorithm in device_keys.items():
query.append((user_id, device_id, algorithm))

opentracing.log_kv(
{"message": "Claiming one time keys.", "user, device pairs": query}
)
log_kv({"message": "Claiming one time keys.", "user, device pairs": query})
results = yield self.store.claim_e2e_one_time_keys(query)

json_result = {}
Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/e2e_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
# limitations under the License.

import logging
import synapse.logging.opentracing as opentracing

from six import iteritems

from canonicaljson import encode_canonical_json, json

from twisted.internet import defer

import synapse.logging.opentracing as opentracing
from synapse.api.errors import CodeMessageException, SynapseError
from synapse.logging.context import make_deferred_yieldable, run_in_background
from synapse.types import UserID, get_domain_from_id
Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/e2e_room_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from twisted.internet import defer

import synapse.logging.opentracing as opentracing
from synapse.api.errors import (
Codes,
NotFoundError,
Expand All @@ -27,7 +28,6 @@
SynapseError,
)
from synapse.util.async_helpers import Linearizer
import synapse.logging.opentracing as opentracing

logger = logging.getLogger(__name__)

Expand Down
3 changes: 2 additions & 1 deletion synapse/rest/client/v2_alpha/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from twisted.internet import defer

import synapse.logging.opentracing as opentracing
from synapse.api.errors import SynapseError
from synapse.http.servlet import (
RestServlet,
Expand All @@ -25,7 +26,7 @@
parse_string,
)
from synapse.types import StreamToken
import synapse.logging.opentracing as opentracing

from ._base import client_patterns

logger = logging.getLogger(__name__)
Expand Down
1 change: 0 additions & 1 deletion synapse/rest/client/v2_alpha/room_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
parse_json_object_from_request,
parse_string,
)
import synapse.logging.opentracing as opentracing

from ._base import client_patterns

Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/e2e_room_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

from twisted.internet import defer

from synapse.api.errors import StoreError
import synapse.logging.opentracing as opentracing
from synapse.api.errors import StoreError

from ._base import SQLBaseStore

Expand Down
3 changes: 1 addition & 2 deletions synapse/storage/end_to_end_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@

from twisted.internet import defer

import synapse.logging.opentracing as opentracing
from synapse.util.caches.descriptors import cached

from ._base import SQLBaseStore, db_to_json

import synapse.logging.opentracing as opentracing


class EndToEndKeyWorkerStore(SQLBaseStore):
@opentracing.trace
Expand Down

0 comments on commit 030f807

Please sign in to comment.