This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Move command processing out of transport#7134
Closed
erikjohnston wants to merge 2 commits intodevelopfrom
Closed
Conversation
11fb08f to
2dd2754
Compare
2dd2754 to
11f5579
Compare
richvdh
suggested changes
Mar 30, 2020
Member
richvdh
left a comment
There was a problem hiding this comment.
sorry, can you break this up? I can't follow it.
| super(GenericWorkerReplicationHandler, self).__init__(hs.get_datastore()) | ||
|
|
||
| class GenericWorkerReplicationHandler(WorkerReplicationDataHandler): | ||
| def __init__(self, hs): |
Member
There was a problem hiding this comment.
needs a call to super().__init__
|
|
||
| class GenericWorkerReplicationHandler(WorkerReplicationDataHandler): | ||
| def __init__(self, hs): | ||
| self.store = hs.get_datastore() |
Member
There was a problem hiding this comment.
this overwrites a field in the base class
| self.send_command(RdataCommand(stream_name, token, data)) | ||
|
|
||
|
|
||
| class DummyReplicationDataHandler: |
Member
There was a problem hiding this comment.
it'd be nice to define an AbstractReplicationDataHandler that defines the interface returned by get_replication_data_handler
Member
Author
|
Closing in favour of #7185 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This moves out the command processing from
protocoland merges it with the logic inclientandresource. This simplifies things quite a bit and merges the server and client handling into one, rather than duplicating a bunch of code.I'd suggest ignoring much of the changes in
protocol.py,client.pyandresource.py, most of it is just moving the code intohandler.py.This PR does a few things on top of the move:
SYNCcommand (we probably just want to remove the command at this point).HomeServerwhich worker apps can replace instead.Based on
#7024and #7128