Rename instance variable.

pull/8369/head
Patrick Cloke 2020-09-30 08:04:13 -04:00
parent cfe28f2729
commit f0c83d909f
1 changed files with 3 additions and 3 deletions

View File

@ -140,10 +140,10 @@ class WorkerConfig(Config):
#
# No effort is made to ensure only a single instance of these tasks is
# running.
instance = config.get("run_background_tasks_on") or "master"
background_tasks_instance = config.get("run_background_tasks_on") or "master"
self.run_background_tasks = (
self.worker_name is None and instance == "master"
) or self.worker_name == instance
self.worker_name is None and background_tasks_instance == "master"
) or self.worker_name == background_tasks_instance
def generate_config_section(self, config_dir_path, server_name, **kwargs):
return """\