Commit 06722ace authored by vicotor's avatar vicotor

fix bug

parent 865fbcd9
......@@ -29,6 +29,7 @@ func main() {
if err != nil {
panic(err)
}
d.Start()
if conf.Debug {
log.SetLevel(log.DebugLevel)
......@@ -53,6 +54,7 @@ func main() {
for _, syncer := range syncers {
syncer.Stop()
}
d.Stop()
log.Info("graceful shutdown completed")
os.Exit(0)
......
......@@ -84,7 +84,6 @@ func New(_c *config.Config) (dao *Dao, err error) {
func (d *Dao) Start() {
d.wg.Add(1)
go d.HandleTasks()
}
func (d *Dao) Stop() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment