更新时间:2024-05-14 GMT+08:00
分享

获取任务信息

功能描述

获取任务相关信息,如任务日志、详情。

命令结构

health nextflow get task <task-id> --jobId  <job-id>  [flags]
表1 参数说明

参数

简写

是否必选

说明

task-id

不涉及

任务id,如果不传,那么获取的是任务列表。

--type

-t

查询类型。

默认detail。

取值:logs、detail 。

  • logs:获取task日志。
  • detail:获取task详情,用于获取task列表。

--jobId

-j

作业Id。

命令示例

  • 获取task列表
    health nextflow get task -j "7991e0b4-bffe-4166-ac2e-45a261592dcc"
    
    {
            "tasks": [
                    {
                            "task_id": "1",
                            "process": "readfile",
                            "hash": "f2/a0f16c",
                            "status": "RUNNING",
                            "container": "swr.xxx/eihealth-0659ea54-5ae6-4e9d-b014-a2b041a26f62/admet:2.0.0.1659942728536",
                            "pod_name": "nf-f2a0f16c66bbe8e28824e8ccabbddd25",
                            "submit": "2023-03-09T08:50:37Z"
                    }
            ],
            "count": 1
    }
  • 获取task详情
    health nextflow get task  1 -j "7991e0b4-bffe-4166-ac2e-45a261592dcc"
    
    {
    	"id": "1",
    	"command": "\n  echo /test;sleep 1000;echo \"end /test\";\n  ",
    	"status": "RUNNING",
    	"exit": 2147483647,
    	"work_dir": "/nextflow/__nextflow_work__/e6dcd289-dadb-48d9-b53b-e0c6c256932e/mb79e5e6-1b14-41b4-ac3b-e8fb0122d64d/f2/a0f16c66bbe8e28824e8ccabbddd25",
    	"module": [],
    	"container": "swr.xxx/eihealth-0659ea54-5ae6-4e9d-b014-a2b041a26f62/admet:2.0.0.1659942728536",
    	"attempt": 1,
    	"execution_time": {
    		"submit": "2023-03-09T08:50:37Z",
    		"start": "2023-03-09T08:50:40Z"
    	},
    	"resource_requested": {
    		"container": "swr.xxx/eihealth-0659ea54-5ae6-4e9d-b014-a2b041a26f62/admet:2.0.0.1659942728536",
    		"cpus": 1
    	},
    	"resource_usage": {}
    }        
  • 获取task日志
    health nextflow get task  1 -j "7991e0b4-bffe-4166-ac2e-45a261592dcc" -t logs
    
    {
            "count": 1,
            "logs": [
                    "2023-03-09T08:50:44Z  /test\n"
            ]
    }

分享:

    相关文档

    相关产品