Skip to content

Commit

Permalink
fix: improve cli command error. (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy authored May 12, 2017
1 parent 957db77 commit 0a9a30c
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ func main() {
gorush.LogError.Fatal(err)
}

gorush.InitAppStatus()
if err := gorush.InitAppStatus(); err != nil {
return
}

gorush.PushToAndroid(req)

return
Expand Down Expand Up @@ -240,8 +243,13 @@ func main() {
gorush.LogError.Fatal(err)
}

gorush.InitAppStatus()
gorush.InitAPNSClient()
if err := gorush.InitAppStatus(); err != nil {
return
}

if err := gorush.InitAPNSClient(); err != nil {
return
}
gorush.PushToIOS(req)

return
Expand All @@ -261,8 +269,17 @@ func main() {
gorush.LogError.Fatal(err)
}

gorush.InitAppStatus()
gorush.InitAPNSClient()
if err = gorush.InitAppStatus(); err != nil {
return
}

if err = gorush.InitAPNSClient(); err != nil {
return
}

gorush.InitWorkers(gorush.PushConf.Core.WorkerNum, gorush.PushConf.Core.QueueNum)
gorush.RunHTTPServer()

if err = gorush.RunHTTPServer(); err != nil {
gorush.LogError.Fatal(err)
}
}

0 comments on commit 0a9a30c

Please sign in to comment.