Move generic agent flags to cmd/agent/core (#3484)

This commit is contained in:
zowhoey
2024-03-15 10:31:35 +00:00
committed by GitHub
parent 0a99726fec
commit ad507d8ee4
2 changed files with 12 additions and 14 deletions

View File

@@ -97,4 +97,16 @@ var flags = []cli.Flag{
Usage: "backend to run pipelines on",
Value: "auto-detect",
},
&cli.IntFlag{
EnvVars: []string{"WOODPECKER_CONNECT_RETRY_COUNT"},
Name: "connect-retry-count",
Usage: "number of times to retry connecting to the server",
Value: 5,
},
&cli.DurationFlag{
EnvVars: []string{"WOODPECKER_CONNECT_RETRY_DELAY"},
Name: "connect-retry-delay",
Usage: "duration to wait before retrying to connect to the server",
Value: time.Second * 2,
},
}