Commit Graph

895 Commits

Author SHA1 Message Date
Emmet McPoland 685a87c930
Concurrent ios pushes (#497)
* 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>
2020-04-23 21:02:53 +08:00
Bo-Yi Wu eec5dd3df7
chore(storage): upgrade redis to v7 (#502)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-04-23 16:23:29 +08:00
Bo-Yi Wu 186b3258d1
chore(storage): upgrade storm to v3 (#501)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-04-23 15:58:03 +08:00
Bo-Yi Wu c2136fffc7
chore(storage): storage performance issues (#500)
* 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>
2020-04-23 15:39:24 +08:00
Bo-Yi Wu 4e05611577
chore(storage): support set db path for badger driver (#499)
* chore(storage): support set db path for badger driver

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix path

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix readme

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update default value

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-04-23 10:34:35 +08:00
Bo-Yi Wu ccc73947ad
chore(storage): upgrade badger to v2 (#498)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-04-23 09:51:13 +08:00
Bo-Yi Wu b008ac4373
Update FUNDING.yml 2020-04-15 14:45:50 +08:00
Bo-Yi Wu 734d9017d2
Create FUNDING.yml 2020-04-15 14:35:06 +08:00
Travis Cline 12842edd2c
docs: fix minor typo (#493) 2020-04-05 16:48:39 +08:00
Bo-Yi Wu 213f098bc0 chore(netlify): update build command 2020-03-21 19:41:16 +08:00
Bo-Yi Wu ca65d8ad2a chore(node): upgrade minimist to 1.2.2 or later 2020-03-21 12:29:55 +08:00
Bo-Yi Wu be64c1f105 docs: Add deploy to netlify 2020-03-21 12:25:17 +08:00
Bo-Yi Wu 64b6f04133 chore: support netlify 2020-03-21 12:18:06 +08:00
Romanenko Alexey 5f0ed4e6cd
docs(gorush): add image and collapse-id to request in readme (#487)
* #373 add image and collapse-id request

* #373 add image and collapse-id request

* #373 add image and collapse-id request
2020-03-15 20:36:20 +08:00
Bo-Yi Wu 34e59dfeaa docs: release v1.12.0 2020-03-14 18:52:30 +08:00
Romanenko Alexey 983aeeb33d
#446 fix context (#484) 2020-03-14 00:06:44 +08:00
Bo-Yi Wu 44bf37941b
chore(grpc): add image field (#485) 2020-03-14 00:00:03 +08:00
Bo-Yi Wu 38f11f0592 chore: fix import path. 2020-03-10 21:10:18 +08:00
Slava Romanov d06e4a2337
solve https://github.com/appleboy/gorush/issues/476 (#481)
* solve https://github.com/appleboy/gorush/issues/476

* add logging to start gRPC server (tcp listener)
change grpc.Server.Stop -> grpc.Server.GracefulStop
add grpc server_test
remove async functions from rpc/server.go

* add logging to err in rpc/server.go
2020-03-10 21:09:03 +08:00
Bo-Yi Wu eb136d137a
chore: support dockerfile lint. (#479) 2020-03-01 20:31:28 +08:00
Yaroslav "Zorg" Zborovsky b58386704c
Fix Redis stats storage concurrency issues (#478) 2020-02-29 17:14:44 +08:00
Romanenko Alexey cbab088ed4
fix fcm notification (#474)
* fix fcm notification

* fix fcm notification for unit test

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-27 13:40:21 +08:00
Bo-Yi Wu cde026d9f9
chore(go): update to go 1.14 (#475)
* chore(go): update to go 1.14

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-27 13:17:20 +08:00
Bo-Yi Wu 52622558bd
chore(gorush): add timeout for http client (#473)
* chore(gorush): add timeout for http client

dispatch feedback url

See: https://github.com/appleboy/gorush/issues/449

* docs: update readme
2020-02-24 22:18:50 +08:00
Bo-Yi Wu e85252b4ae chore: remove docker build command 2020-02-19 23:55:23 +08:00
Emmet McPoland dbc57cd828
Allow ability to explicitly set APNS priority (#437)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-07 11:50:20 +08:00
Bo-Yi Wu cee47bdc2c chore(module): remove unused module
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-07 11:41:05 +08:00
Sebastien Melki 3556bfd575
Fix image fcm (#454)
* 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
2020-02-07 11:39:44 +08:00
Bo-Yi Wu c379630c29
chore(graceful): support custom timeout value (#466)
fixed: https://github.com/appleboy/gorush/issues/465
2020-02-05 23:23:16 +08:00
Bo-Yi Wu eba8c2d4a6
chore(log): ignore /healthz request log (#464)
* chore(log): ignore /healthz request log

Add zerolog for gin httpd log

fixed: https://github.com/appleboy/gorush/issues/435

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* remove variable

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-05 16:57:55 +08:00
Bo-Yi Wu 2113dfc84e
chore(rpc): graceful shutdown for RPC server (#463)
graceful shutdown for grpc service.
2020-02-04 22:42:06 +08:00
Bo-Yi Wu bcd0e70252
feat(server): support graceful shutdown (#461)
* feat(server): support graceful shutdown

for http server

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-04 17:10:12 +08:00
Bo-Yi Wu ee0cc30e3d docs: fix typo
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-04 13:30:34 +08:00
Bo-Yi Wu 2d2a8a0110
feat(worker): support graceful shutdown (#459)
* 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>
2020-02-04 13:27:27 +08:00
Bo-Yi Wu bcf1c0cd03 chore(makefile): remove GOPKG variable
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-03 16:50:13 +08:00
Bo-Yi Wu 850509e77c
chore(healthy): disable proxy in healthy check (#457)
fixed: https://github.com/appleboy/gorush/issues/456

Don’t use Go’s default HTTP client (in production)

ref: https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779
2020-01-25 10:16:41 +08:00
Viktor Radchenko c5a41eda4c Add support for Heroku (#447) 2020-01-25 08:23:54 +08:00
Sebastien Melki 5cb40cf5b4 [Important] allow sending data ONLY notifications for FCM notifi… (#453)
* 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>
2020-01-20 23:14:07 +08:00
Bo-Yi Wu cd83da717d
chore: upgrade gofight and gin-status-api (#452)
* chore: upgrade gofight and gin-status-api

* chore: update testing
2020-01-13 23:05:27 +08:00
igorljubuncic 726184a55d Add support for building snaps (#387) 2019-12-08 09:37:27 +08:00
Cem KIY 682ca7fbad badger version upgrade to v1.6.0 (#439)
* badger version upgrade to v1.6.0

- excuted go mod tidy command
- fixed badger error when without go mod

* go mod tidy and update packages
2019-12-08 07:41:16 +08:00
Bo-Yi Wu 969af2c42b docs: Support HTTP, HTTPS or SOCKS5 proxy for apns and fcm 2019-12-08 07:33:26 +08:00
Keisuke Emi 1edfa9f532 Support HTTP proxy for APNs (#445) 2019-12-08 07:30:24 +08:00
Bo-Yi Wu 6f2b614265 chore: remove graceful restart feature 2019-11-29 07:17:41 +08:00
Bo-Yi Wu 00e5a596e2
chore: upgrade to gin v1.5 (#442)
* chore: upgrade to gin v1.5

* chore: fix testing error
2019-11-29 07:16:06 +08:00
Emmet McPoland d9aa8cb408 Allow APNS expiration to be 0 (#436) 2019-11-02 14:27:22 +08:00
Bo-Yi Wu 3bfcd1e822
chore: replace yarn with npm (#434)
* chore: replace yarn with npm

* chore: update node.js example
2019-10-27 12:13:40 +08:00
Bo-Yi Wu d86ccf15ea
fix: Cannot build for aws lambda (#433)
* fix: Cannot build for aws lambda

fix: https://github.com/appleboy/gorush/issues/432

* update command

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update command

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-10-27 11:13:49 +08:00
Bo-Yi Wu a49bf91e75
Some improve (#425)
* 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>
2019-10-17 23:49:21 +08:00
Bo-Yi Wu 453c919510
chore: Don't send notification after client timeout or disconnected. (#431)
* chore: Don't send notification after client timeout or disconnected.

* add skip

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-10-17 23:19:25 +08:00