Show host information when failing to obtain a task

This commit is contained in:
allegroai 2020-04-01 19:12:45 +03:00
parent a6a0b01f71
commit 8d47905982

View File

@ -1081,7 +1081,11 @@ class Worker(ServiceCommandSection):
if not current_task.id: if not current_task.id:
pass pass
except Exception: except Exception:
raise ValueError("Could not find task id={}".format(task_id)) raise ValueError(
"Could not find task id={} (for host: {})".format(
task_id, self._session.config.get("api.host", "")
)
)
if clone: if clone:
try: try: