Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
91f51c61
Commit
91f51c61
authored
4 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
remove redundant `__func__`
this is a no-op under python 3
parent
65902e08
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/replication/slave/storage/_base.py
+0
-9
0 additions, 9 deletions
synapse/replication/slave/storage/_base.py
synapse/replication/slave/storage/presence.py
+4
-4
4 additions, 4 deletions
synapse/replication/slave/storage/presence.py
with
4 additions
and
13 deletions
synapse/replication/slave/storage/_base.py
+
0
−
9
View file @
91f51c61
...
...
@@ -16,8 +16,6 @@
import
logging
from
typing
import
Optional
import
six
from
synapse.storage.data_stores.main.cache
import
CacheInvalidationWorkerStore
from
synapse.storage.database
import
Database
from
synapse.storage.engines
import
PostgresEngine
...
...
@@ -26,13 +24,6 @@ from synapse.storage.util.id_generators import MultiWriterIdGenerator
logger
=
logging
.
getLogger
(
__name__
)
def
__func__
(
inp
):
if
six
.
PY3
:
return
inp
else
:
return
inp
.
__func__
class
BaseSlavedStore
(
CacheInvalidationWorkerStore
):
def
__init__
(
self
,
database
:
Database
,
db_conn
,
hs
):
super
(
BaseSlavedStore
,
self
).
__init__
(
database
,
db_conn
,
hs
)
...
...
This diff is collapsed.
Click to expand it.
synapse/replication/slave/storage/presence.py
+
4
−
4
View file @
91f51c61
...
...
@@ -18,7 +18,7 @@ from synapse.storage.data_stores.main.presence import PresenceStore
from
synapse.storage.database
import
Database
from
synapse.util.caches.stream_change_cache
import
StreamChangeCache
from
._base
import
BaseSlavedStore
,
__func__
from
._base
import
BaseSlavedStore
from
._slaved_id_tracker
import
SlavedIdTracker
...
...
@@ -27,14 +27,14 @@ class SlavedPresenceStore(BaseSlavedStore):
super
(
SlavedPresenceStore
,
self
).
__init__
(
database
,
db_conn
,
hs
)
self
.
_presence_id_gen
=
SlavedIdTracker
(
db_conn
,
"
presence_stream
"
,
"
stream_id
"
)
self
.
_presence_on_startup
=
self
.
_get_active_presence
(
db_conn
)
self
.
_presence_on_startup
=
self
.
_get_active_presence
(
db_conn
)
# type: ignore
self
.
presence_stream_cache
=
StreamChangeCache
(
"
PresenceStreamChangeCache
"
,
self
.
_presence_id_gen
.
get_current_token
()
)
_get_active_presence
=
__func__
(
DataStore
.
_get_active_presence
)
take_presence_startup_info
=
__func__
(
DataStore
.
take_presence_startup_info
)
_get_active_presence
=
DataStore
.
_get_active_presence
take_presence_startup_info
=
DataStore
.
take_presence_startup_info
_get_presence_for_user
=
PresenceStore
.
__dict__
[
"
_get_presence_for_user
"
]
get_presence_for_users
=
PresenceStore
.
__dict__
[
"
get_presence_for_users
"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment