Rename instance variable.
parent
cfe28f2729
commit
f0c83d909f
|
@ -140,10 +140,10 @@ class WorkerConfig(Config):
|
||||||
#
|
#
|
||||||
# No effort is made to ensure only a single instance of these tasks is
|
# No effort is made to ensure only a single instance of these tasks is
|
||||||
# running.
|
# 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.run_background_tasks = (
|
||||||
self.worker_name is None and instance == "master"
|
self.worker_name is None and background_tasks_instance == "master"
|
||||||
) or self.worker_name == instance
|
) or self.worker_name == background_tasks_instance
|
||||||
|
|
||||||
def generate_config_section(self, config_dir_path, server_name, **kwargs):
|
def generate_config_section(self, config_dir_path, server_name, **kwargs):
|
||||||
return """\
|
return """\
|
||||||
|
|
Loading…
Reference in New Issue