mirror of
https://github.com/clearml/clearml-agent
synced 2025-04-16 21:41:55 +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(
|
||||
'--standalone-mode' if self._standalone_mode else '', task_id)
|
||||
cmd = Argv(*full_docker_cmd)
|
||||
print('Running Docker:\n{}\n'.format(str(cmd)))
|
||||
else:
|
||||
cmd = worker_args.get_argv_for_command("execute") + (
|
||||
"--disable-monitoring",
|
||||
@ -1080,10 +1081,10 @@ class Worker(ServiceCommandSection):
|
||||
current_task = self._session.api_client.tasks.get_by_id(task_id)
|
||||
if not current_task.id:
|
||||
pass
|
||||
except Exception:
|
||||
except Exception as ex:
|
||||
raise ValueError(
|
||||
"Could not find task id={} (for host: {})".format(
|
||||
task_id, self._session.config.get("api.host", "")
|
||||
"Could not find task id={} (for host: {})\nException: {}".format(
|
||||
task_id, self._session.config.get("api.host", ""), ex
|
||||
)
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user