-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Move command processing out of transport #7134
Conversation
11fb08f to
2dd2754
Compare
2dd2754 to
11f5579
Compare
richvdh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs a call to super().__init__
|
|
||
| class GenericWorkerReplicationHandler(WorkerReplicationDataHandler): | ||
| def __init__(self, hs): | ||
| self.store = hs.get_datastore() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this overwrites a field in the base class
| self.send_command(RdataCommand(stream_name, token, data)) | ||
|
|
||
|
|
||
| class DummyReplicationDataHandler: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd be nice to define an AbstractReplicationDataHandler that defines the interface returned by get_replication_data_handler
|
Closing in favour of #7185 |
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