changed to an "event bus" approach in the message queue, fixed unset download parameters.
This commit is contained in:
6
main.go
6
main.go
@@ -39,10 +39,14 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
qs := runtime.NumCPU() - 1
|
||||
if qs == 0 {
|
||||
qs = 1
|
||||
}
|
||||
|
||||
flag.StringVar(&host, "host", "0.0.0.0", "Host where server will listen at")
|
||||
flag.IntVar(&port, "port", 3033, "Port where server will listen at")
|
||||
flag.IntVar(&queueSize, "qs", runtime.NumCPU(), "Download queue size")
|
||||
flag.IntVar(&queueSize, "qs", qs, "Download queue size")
|
||||
|
||||
flag.StringVar(&configFile, "conf", "./config.yml", "Config file path")
|
||||
flag.StringVar(&downloadPath, "out", ".", "Where files will be saved")
|
||||
|
||||
Reference in New Issue
Block a user