fix a bug when decoding image name_owner_type in taskmgr

This commit is contained in:
Gallen 2019-05-14 16:32:31 +08:00
parent 2eb187c066
commit 5925cf6764
1 changed files with 3 additions and 3 deletions

View File

@ -687,9 +687,9 @@ class TaskMgr(threading.Thread):
username = username,
vnode = VNode(
image = Image(
name = json_task['image'].split('_')[0], #json_task['cluster']['image']['name'],
type = image_dict[json_task['image'].split('_')[2]], #json_task['cluster']['image']['type'],
owner = username if not json_task['image'].split('_')[1] else json_task['image'].split('_')[1]), #json_task['cluster']['image']['owner']),
name = '_'.join(json_task['image'].split('_')[:-2]), #json_task['cluster']['image']['name'],
type = image_dict[json_task['image'].split('_')[-1]], #json_task['cluster']['image']['type'],
owner = username if not json_task['image'].split('_')[-2] else json_task['image'].split('_')[-2]), #json_task['cluster']['image']['owner']),
instance = Instance(
cpu = int(json_task['cpuSetting']),
memory = int(json_task['memorySetting']),