diff options
author | drebs <drebs@leap.se> | 2015-04-09 17:18:37 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2015-04-09 18:20:00 -0300 |
commit | b0ef529cc882a96903597fb5279919969fa286c3 (patch) | |
tree | 2243cd550e3e0769880b350184b5f5a3653c362a /src/leap/mx/tcp_map.py | |
parent | 45adb4d6cfdb8b9ed11e3efc398d00ec6dbdc0b0 (diff) |
[refactor] use couch reduced views for lookups
The way uuid and pgp key were being queried by means of couch views was not
efficient because they weren't using the reduce function and were filtering
the views results in the python code. Also, the uuid is not actually needed to
find out either if the address exists or if there's a pgp public key for that
address. This commit refactors the couch helper to make use of the reduce
functions in queried views and to get rid of the intermediate uuid querying.
Diffstat (limited to 'src/leap/mx/tcp_map.py')
-rw-r--r-- | src/leap/mx/tcp_map.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/leap/mx/tcp_map.py b/src/leap/mx/tcp_map.py index b62441f..d8cd835 100644 --- a/src/leap/mx/tcp_map.py +++ b/src/leap/mx/tcp_map.py @@ -43,9 +43,7 @@ class LEAPPostfixTCPMapServerFactory(ServerFactory): def get(self, key): """ - Look up uuid based on key, only up to the username id of the key. - - At some point we will have to consider the domain part too. + Look up if address exists. :param key: The lookup key. :type key: str |