Skip to content

Commit

Permalink
feat: 增加heartbeat参数 #61
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlkl authored Aug 28, 2023
1 parent 915d731 commit 67758a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion analysis-tool-sdk-golang/object/argument.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type Arguments struct {
InputFilePath string
OutputFilePath string
KeepRunning bool
Heartbeat int
downloaderClient *http.Client
}

Expand All @@ -34,17 +35,19 @@ func newArguments() *Arguments {
flag.BoolVar(&args.KeepRunning, "keep-running", true, "是否一直运行,仅在拉取任务模式下生效")
flag.StringVar(&args.InputFilePath, "input", "", "输入文件路径")
flag.StringVar(&args.OutputFilePath, "output", "", "输出文件路径")
flag.IntVar(&args.Heartbeat, "heartbeat", 0, "任务心跳上报间隔,0表示不上报")
flag.Parse()

fmt.Printf(
"url: %s, token: %s, taskId: %s, executionCluster: %s, pull-retry: %d, keep-running: %t, "+
"url: %s, token: %s, taskId: %s, executionCluster: %s, pull-retry: %d, keep-running: %t, heartbeat: %d"+
"inputFilePath: %s, outputFilePath: %s\n",
args.Url,
args.Token,
args.TaskId,
args.ExecutionCluster,
args.PullRetry,
args.KeepRunning,
args.Heartbeat,
args.InputFilePath,
args.OutputFilePath,
)
Expand Down

0 comments on commit 67758a2

Please sign in to comment.