def __init__(self, hs: 'HomeServer'):
    self.hs = hs
    self.pusher_factory = PusherFactory(hs)
    self.store = self.hs.get_datastore()
    self.clock = self.hs.get_clock()
    self._pusher_shard_config = hs.config.worker.pusher_shard_config
    self._instance_name = hs.get_instance_name()
    self._should_start_pushers = (self._instance_name in self._pusher_shard_config.instances)
    self._remove_pusher_client = None
    if hs.config.worker.worker_app:
        self._remove_pusher_client = ReplicationRemovePusherRestServlet.make_client(hs)
    self._last_room_stream_id_seen = self.store.get_room_max_stream_ordering()
    self.pushers: Dict[(str, Dict[(str, Pusher)])] = {}
    self._account_validity_handler = hs.get_account_validity_handler()
def __init__(self, hs: 'HomeServer'):
    self.hs = hs
    self.pusher_factory = PusherFactory(hs)
    self.store = self.hs.get_datastore()
    self.clock = self.hs.get_clock()
    self._pusher_shard_config = hs.config.worker.pusher_shard_config
    self._instance_name = hs.get_instance_name()
    self._should_start_pushers = (self._instance_name in self._pusher_shard_config.instances)
    self._remove_pusher_client = None
    if hs.config.worker.worker_app:
        self._remove_pusher_client = ReplicationRemovePusherRestServlet.make_client(hs)
    self._last_room_stream_id_seen = self.store.get_room_max_stream_ordering()
    self.pushers: Dict[(str, Dict[(str, Pusher)])] = {}
    self._account_validity_handler = hs.get_account_validity_handler()