Skip to content
Snippets Groups Projects
Forked from Maunium / synapse
Source project has a limited visibility.
  • Erik Johnston's avatar
    29279219
    Clean up `ShardedWorkerHandlingConfig` (#9466) · 29279219
    Erik Johnston authored
    * Split ShardedWorkerHandlingConfig
    
    This is so that we have a type level understanding of when it is safe to
    call `get_instance(..)` (as opposed to `should_handle(..)`).
    
    * Remove special cases in ShardedWorkerHandlingConfig.
    
    `ShardedWorkerHandlingConfig` tried to handle the various different ways
    it was possible to configure federation senders and pushers. This led to
    special cases that weren't hit during testing.
    
    To fix this the handling of the different cases is moved from there and
    `generic_worker` into the worker config class. This allows us to have
    the logic in one place and allows the rest of the code to ignore the
    different cases.
    29279219
    History
    Clean up `ShardedWorkerHandlingConfig` (#9466)
    Erik Johnston authored
    * Split ShardedWorkerHandlingConfig
    
    This is so that we have a type level understanding of when it is safe to
    call `get_instance(..)` (as opposed to `should_handle(..)`).
    
    * Remove special cases in ShardedWorkerHandlingConfig.
    
    `ShardedWorkerHandlingConfig` tried to handle the various different ways
    it was possible to configure federation senders and pushers. This led to
    special cases that weren't hit during testing.
    
    To fix this the handling of the different cases is moved from there and
    `generic_worker` into the worker config class. This allows us to have
    the logic in one place and allows the rest of the code to ignore the
    different cases.