mirror of
https://github.com/clearml/clearml-agent
synced 2025-06-26 18:16:15 +00:00
Improve error message when failing to locate a task
This commit is contained in:
parent
8d47905982
commit
fc28467080
@ -466,6 +466,7 @@ class Worker(ServiceCommandSection):
|
|||||||
full_docker_cmd[-1] = full_docker_cmd[-1] + 'execute --disable-monitoring {} --id {}'.format(
|
full_docker_cmd[-1] = full_docker_cmd[-1] + 'execute --disable-monitoring {} --id {}'.format(
|
||||||
'--standalone-mode' if self._standalone_mode else '', task_id)
|
'--standalone-mode' if self._standalone_mode else '', task_id)
|
||||||
cmd = Argv(*full_docker_cmd)
|
cmd = Argv(*full_docker_cmd)
|
||||||
|
print('Running Docker:\n{}\n'.format(str(cmd)))
|
||||||
else:
|
else:
|
||||||
cmd = worker_args.get_argv_for_command("execute") + (
|
cmd = worker_args.get_argv_for_command("execute") + (
|
||||||
"--disable-monitoring",
|
"--disable-monitoring",
|
||||||
@ -1080,10 +1081,10 @@ class Worker(ServiceCommandSection):
|
|||||||
current_task = self._session.api_client.tasks.get_by_id(task_id)
|
current_task = self._session.api_client.tasks.get_by_id(task_id)
|
||||||
if not current_task.id:
|
if not current_task.id:
|
||||||
pass
|
pass
|
||||||
except Exception:
|
except Exception as ex:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Could not find task id={} (for host: {})".format(
|
"Could not find task id={} (for host: {})\nException: {}".format(
|
||||||
task_id, self._session.config.get("api.host", "")
|
task_id, self._session.config.get("api.host", ""), ex
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user