Always return a deferred from get_current_state_deltas. (#7019)
* commit 'b29474e0a': Always return a deferred from `get_current_state_deltas`. (#7019)
This commit is contained in:
1
changelog.d/7019.misc
Normal file
1
changelog.d/7019.misc
Normal file
@@ -0,0 +1 @@
|
||||
Port `synapse.handlers.presence` to async/await.
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
import logging
|
||||
|
||||
from twisted.internet import defer
|
||||
|
||||
from synapse.storage._base import SQLBaseStore
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -56,7 +58,7 @@ class StateDeltasStore(SQLBaseStore):
|
||||
# if the CSDs haven't changed between prev_stream_id and now, we
|
||||
# know for certain that they haven't changed between prev_stream_id and
|
||||
# max_stream_id.
|
||||
return max_stream_id, []
|
||||
return defer.succeed((max_stream_id, []))
|
||||
|
||||
def get_current_state_deltas_txn(txn):
|
||||
# First we calculate the max stream id that will give us less than
|
||||
|
||||
Reference in New Issue
Block a user