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
Package registry
Container registry
Model registry
Operate
Terraform modules
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
Timo Ley
synapse
Commits
873f870e
Commit
873f870e
authored
8 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Add new direct message storage functions to slave store
parent
5acbe09b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/app/synchrotron.py
+2
-0
2 additions, 0 deletions
synapse/app/synchrotron.py
synapse/replication/slave/storage/deviceinbox.py
+30
-0
30 additions, 0 deletions
synapse/replication/slave/storage/deviceinbox.py
with
32 additions
and
0 deletions
synapse/app/synchrotron.py
+
2
−
0
View file @
873f870e
...
@@ -36,6 +36,7 @@ from synapse.replication.slave.storage.registration import SlavedRegistrationSto
...
@@ -36,6 +36,7 @@ from synapse.replication.slave.storage.registration import SlavedRegistrationSto
from
synapse.replication.slave.storage.filtering
import
SlavedFilteringStore
from
synapse.replication.slave.storage.filtering
import
SlavedFilteringStore
from
synapse.replication.slave.storage.push_rule
import
SlavedPushRuleStore
from
synapse.replication.slave.storage.push_rule
import
SlavedPushRuleStore
from
synapse.replication.slave.storage.presence
import
SlavedPresenceStore
from
synapse.replication.slave.storage.presence
import
SlavedPresenceStore
from
synapse.replication.slave.storage.deviceinbox
import
SlavedDeviceInboxStore
from
synapse.server
import
HomeServer
from
synapse.server
import
HomeServer
from
synapse.storage.client_ips
import
ClientIpStore
from
synapse.storage.client_ips
import
ClientIpStore
from
synapse.storage.engines
import
create_engine
from
synapse.storage.engines
import
create_engine
...
@@ -72,6 +73,7 @@ class SynchrotronSlavedStore(
...
@@ -72,6 +73,7 @@ class SynchrotronSlavedStore(
SlavedRegistrationStore
,
SlavedRegistrationStore
,
SlavedFilteringStore
,
SlavedFilteringStore
,
SlavedPresenceStore
,
SlavedPresenceStore
,
SlavedDeviceInboxStore
,
BaseSlavedStore
,
BaseSlavedStore
,
ClientIpStore
,
# After BaseSlavedStore because the constructor is different
ClientIpStore
,
# After BaseSlavedStore because the constructor is different
):
):
...
...
This diff is collapsed.
Click to expand it.
synapse/replication/slave/storage/deviceinbox.py
0 → 100644
+
30
−
0
View file @
873f870e
# -*- coding: utf-8 -*-
# Copyright 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
._base
import
BaseSlavedStore
from
._slaved_id_tracker
import
SlavedIdTracker
from
synapse.storage
import
DataStore
class
SlavedDeviceInboxStore
(
BaseSlavedStore
):
def
__init__
(
self
,
db_conn
,
hs
):
super
(
SlavedDeviceInboxStore
,
self
).
__init__
(
db_conn
,
hs
)
self
.
_device_inbox_id_gen
=
SlavedIdTracker
(
db_conn
,
"
device_inbox
"
,
"
stream_id
"
,
)
get_to_device_stream_token
=
DataStore
.
get_to_device_stream_token
.
__func__
get_new_messages_for_device
=
DataStore
.
get_new_messages_for_device
.
__func__
delete_messages_for_device
=
DataStore
.
delete_messages_for_device
.
__func__
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