@@ -109,12 +109,10 @@ def read_config(self, config, **kwargs):
109
109
federation_sender_instances
110
110
)
111
111
112
- # A map from instance name to host/port of their HTTP replication endpoint
113
- # (or None if there's no HTTP replication endpoint).
112
+ # A map from instance name to host/port of their HTTP replication endpoint.
114
113
instance_map = config .get ("instance_map" ) or {}
115
114
self .instance_map = {
116
- name : InstanceLocationConfig (** c ) if c else None
117
- for name , c in instance_map .items ()
115
+ name : InstanceLocationConfig (** c ) for name , c in instance_map .items ()
118
116
}
119
117
120
118
# Map from type of streams to source, c.f. WriterLocations.
@@ -140,14 +138,9 @@ def read_config(self, config, **kwargs):
140
138
# be able to run on only a single instance (meaning that they don't
141
139
# depend on any in-memory state of a particular worker).
142
140
#
143
- # Effort is not made to ensure only a single instance of these tasks is
141
+ # No effort is made to ensure only a single instance of these tasks is
144
142
# running.
145
143
instance = config .get ("run_background_tasks_on" ) or "master"
146
- if instance != "master" and instance not in self .instance_map :
147
- raise ConfigError (
148
- "Instance %r is configured to run background tasks but does not appear in `instance_map` config."
149
- % (instance ,)
150
- )
151
144
self .run_background_tasks = (
152
145
self .worker_name is None and instance == "master"
153
146
) or self .worker_name == instance
0 commit comments