* Added the ability to concurrently call.push. Linter was complaining about "loop variable token captured by", need to determine if its a legitiment issue, as the lint message has now disappeared
* resolved "loop variable token captured by func literal" issue
* Ran make_fmt
* Moved max_concurrent_pushes to iOS
* Moved from limitgroup to sizedwaitgroup
* Removed SizedWaitGroup. Using client pool of 1 and buffered channels
* Fill client pool with the same client
* MaxConcurrentPushes is now applied across all running pushes
* Ran make fmt
* Corrected TestPushToIOS test
* Update README.md
Co-Authored-By: Yaroslav "Zorg" Zborovsky <yaronius@users.noreply.github.com>
* Added comment to config in all copies for max_concurrent_pushes
* Updated TestPushToIOS to be driven from config
Co-authored-by: Yaroslav "Zorg" Zborovsky <yaronius@users.noreply.github.com>
* chore(storage): storage performance issues
1. close storage connection before shutdown the service
2. update windows image
https://github.com/appleboy/gorush/issues/393
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* allow sending data ONLY notifications for FCM notifications
* fix tests to pass
* support image parameter used for FCM
* remove unused import
* read apns payload on fcm notifications
* update go-fcm to 0.1.5
* feat(worker): support graceful shutdown
notifications workers and queue have been sent to APNs/FCM before shutdown a push notification.
send buffered channel to signal.Notify to avoid blocking
see: golang/lint#175
fixed: https://github.com/appleboy/gorush/issues/441
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* allow sending data ONLY notifications for FCM notifications
ran into a little issue here need this tweak to be able to send and process background notifications on android
If you want to process android notifications in the BACKGROUND, they need to be data notifications, as in not contain the "notification" key in the payload.
This little change achieves it, because omitempty on structs for the JSON encoding does not work on sub-structs except if it is a pointer to it and set to nil.
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Some improve
1. Use bytes.Buffer.String or bytes.Buffer.Bytes
2. Use a single append to concatenate two slices
3. Poor file permissions used when creating file or using chmod
4. Using a deprecated function, variable, constant or field
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* improve
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>