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
f8421a14
Unverified
Commit
f8421a14
authored
5 years ago
by
Brendan Abolivier
Browse files
Options
Downloads
Patches
Plain Diff
Fix background updates for synapse_port_db
parent
02c1f36c
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
scripts/synapse_port_db
+2
-0
2 additions, 0 deletions
scripts/synapse_port_db
synapse/storage/data_stores/main/room.py
+10
-2
10 additions, 2 deletions
synapse/storage/data_stores/main/room.py
with
12 additions
and
2 deletions
scripts/synapse_port_db
+
2
−
0
View file @
f8421a14
...
...
@@ -47,6 +47,7 @@ from synapse.storage.data_stores.main.media_repository import (
from
synapse.storage.data_stores.main.registration
import
(
RegistrationBackgroundUpdateStore
,
)
from
synapse.storage.data_stores.main.room
import
RoomBackgroundUpdateStore
from
synapse.storage.data_stores.main.roommember
import
RoomMemberBackgroundUpdateStore
from
synapse.storage.data_stores.main.search
import
SearchBackgroundUpdateStore
from
synapse.storage.data_stores.main.state
import
StateBackgroundUpdateStore
...
...
@@ -131,6 +132,7 @@ class Store(
EventsBackgroundUpdatesStore
,
MediaRepositoryBackgroundUpdateStore
,
RegistrationBackgroundUpdateStore
,
RoomBackgroundUpdateStore
,
RoomMemberBackgroundUpdateStore
,
SearchBackgroundUpdateStore
,
StateBackgroundUpdateStore
,
...
...
This diff is collapsed.
Click to expand it.
synapse/storage/data_stores/main/room.py
+
10
−
2
View file @
f8421a14
...
...
@@ -28,6 +28,7 @@ from twisted.internet import defer
from
synapse.api.constants
import
EventTypes
from
synapse.api.errors
import
StoreError
from
synapse.storage._base
import
SQLBaseStore
from
synapse.storage.background_updates
import
BackgroundUpdateStore
from
synapse.storage.data_stores.main.search
import
SearchStore
from
synapse.types
import
ThirdPartyInstanceID
from
synapse.util.caches.descriptors
import
cached
,
cachedInlineCallbacks
...
...
@@ -360,9 +361,9 @@ class RoomWorkerStore(SQLBaseStore):
defer
.
returnValue
(
row
)
class
Room
Store
(
RoomWorkerStore
,
Search
Store
):
class
Room
BackgroundUpdateStore
(
BackgroundUpdate
Store
):
def
__init__
(
self
,
db_conn
,
hs
):
super
(
RoomStore
,
self
).
__init__
(
db_conn
,
hs
)
super
(
Room
BackgroundUpdate
Store
,
self
).
__init__
(
db_conn
,
hs
)
self
.
config
=
hs
.
config
...
...
@@ -438,6 +439,13 @@ class RoomStore(RoomWorkerStore, SearchStore):
defer
.
returnValue
(
batch_size
)
class
RoomStore
(
RoomBackgroundUpdateStore
,
RoomWorkerStore
,
SearchStore
):
def
__init__
(
self
,
db_conn
,
hs
):
super
(
RoomStore
,
self
).
__init__
(
db_conn
,
hs
)
self
.
config
=
hs
.
config
@defer.inlineCallbacks
def
store_room
(
self
,
room_id
,
room_creator_user_id
,
is_public
):
"""
Stores a room.
...
...
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