diff --git a/main.go b/main.go index 658b3ef..3ad1d7b 100644 --- a/main.go +++ b/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) diff --git a/options.go b/options.go index 0711c55..cd65620 100644 --- a/options.go +++ b/options.go @@ -24,7 +24,6 @@ type Options struct { Version bool MaxBulk int Month string - Pidfile string Queue int } @@ -44,7 +43,6 @@ func usage() { -i -l -T - -p -M -q -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") }