Fix for multi-instance auto complete

- Also only read credentials json if valid
This commit is contained in:
Fred Park 2017-03-24 14:54:19 -07:00
Родитель 15d4c4458f
Коммит f4b08a9f77
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1754,7 +1754,7 @@ def add_jobs(
# 1. check docker images in task against pre-loaded on pool
# 2. if tasks have dependencies, set it if so
# 3. if there are multi-instance tasks
mi_ac = settings.job_multi_instance_auto_complete(config)
mi_ac = settings.job_multi_instance_auto_complete(jobspec)
multi_instance = False
mi_docker_container_name = None
reserved_task_id = None

Просмотреть файл

@ -218,11 +218,11 @@ class CliContext(object):
if self.configdir is not None and self.json_credentials is None:
self.json_credentials = pathlib.Path(
self.configdir, 'credentials.json')
if (self.json_credentials is not None and
not isinstance(self.json_credentials, pathlib.Path)):
self.json_credentials = pathlib.Path(self.json_credentials)
if self.json_credentials.exists():
self._read_json_file(self.json_credentials)
if self.json_credentials is not None:
if not isinstance(self.json_credentials, pathlib.Path):
self.json_credentials = pathlib.Path(self.json_credentials)
if self.json_credentials.exists():
self._read_json_file(self.json_credentials)
def _init_config(
self, skip_global_config=False, skip_pool_config=False,