eliminata la gestione del PID
This commit is contained in:
parent
73cfd49a17
commit
fed914f2cc
2 changed files with 2 additions and 10 deletions
6
main.go
6
main.go
|
@ -12,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
_Version = "v2.2.1"
|
||||
_Version = "v2.2.2"
|
||||
_Producer = 0
|
||||
_Consumer = 1
|
||||
)
|
||||
|
@ -55,10 +55,6 @@ func main() {
|
|||
|
||||
log.SetOutput(fs)
|
||||
|
||||
pid.PIDFile = opts.Pidfile
|
||||
pid.Write(true)
|
||||
defer pid.Remove()
|
||||
|
||||
start = time.Now()
|
||||
fmt.Printf("Start: %+v\n\t%+v\n", opts, dbs)
|
||||
log.Printf("Start: %+v\n\t%+v\n", opts, dbs)
|
||||
|
|
|
@ -24,7 +24,6 @@ type Options struct {
|
|||
Version bool
|
||||
MaxBulk int
|
||||
Month string
|
||||
Pidfile string
|
||||
Queue int
|
||||
}
|
||||
|
||||
|
@ -44,7 +43,6 @@ func usage() {
|
|||
-i <influxdb [localname@ip:port]>
|
||||
-l <logfile>
|
||||
-T <running ttl>
|
||||
-p <pid filename>
|
||||
-M <bulk size>
|
||||
-q <num consumer>
|
||||
-v`)
|
||||
|
@ -60,7 +58,6 @@ func init() {
|
|||
}
|
||||
|
||||
opts.LogFile = path.Join(opts.CurrentPath, opts.LogFile)
|
||||
opts.Pidfile = path.Join(opts.CurrentPath, "run", path.Base(os.Args[0])+".pid")
|
||||
opts.Exe = path.Base(os.Args[0])
|
||||
|
||||
flag.StringVar(&dbs.MongoURI, "m", "", "Mongodb")
|
||||
|
@ -73,7 +70,6 @@ func init() {
|
|||
flag.DurationVar(&opts.Timeout, "T", 0, "Running timeout")
|
||||
flag.BoolVar(&opts.Debug, "D", false, "Debug")
|
||||
flag.BoolVar(&opts.Test, "DD", false, "Test")
|
||||
flag.IntVar(&opts.MaxBulk, "M", 1000, "Max Mongodb bulk")
|
||||
flag.IntVar(&opts.MaxBulk, "M", 500, "Max Mongodb bulk")
|
||||
flag.IntVar(&opts.Queue, "q", 2, "parallel consumer")
|
||||
flag.StringVar(&opts.Pidfile, "p", opts.Pidfile, "pid file")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue