Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
1b2af116
Commit
1b2af116
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Document abstract class and method better
parent
f793bc38
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/storage/stream.py
+13
-8
13 additions, 8 deletions
synapse/storage/stream.py
with
13 additions
and
8 deletions
synapse/storage/stream.py
+
13
−
8
View file @
1b2af116
...
...
@@ -148,6 +148,11 @@ def filter_to_clause(event_filter):
class
StreamWorkerStore
(
EventsWorkerStore
,
SQLBaseStore
):
"""
This is an abstract base class where subclasses must implement
`get_room_max_stream_ordering` and `get_room_min_stream_ordering`
which can be called in the initializer.
"""
__metaclass__
=
abc
.
ABCMeta
def
__init__
(
self
,
db_conn
,
hs
):
...
...
@@ -170,6 +175,14 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
self
.
_stream_order_on_start
=
self
.
get_room_max_stream_ordering
()
@abc.abstractmethod
def
get_room_max_stream_ordering
(
self
):
raise
NotImplementedError
()
@abc.abstractmethod
def
get_room_min_stream_ordering
(
self
):
raise
NotImplementedError
()
@defer.inlineCallbacks
def
get_room_events_stream_for_rooms
(
self
,
room_ids
,
from_key
,
to_key
,
limit
=
0
,
order
=
'
DESC
'
):
...
...
@@ -421,14 +434,6 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
)
defer
.
returnValue
(
"
t%d-%d
"
%
(
topo
,
token
))
@abc.abstractmethod
def
get_room_max_stream_ordering
(
self
):
raise
NotImplementedError
()
@abc.abstractmethod
def
get_room_min_stream_ordering
(
self
):
raise
NotImplementedError
()
def
get_stream_token_for_event
(
self
,
event_id
):
"""
The stream token for an event
Args:
...
...
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