Skip to content

Commit

Permalink
setting defaults to true for FCM and APNS interval-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosmin Rentea committed Nov 30, 2016
1 parent 69e39b0 commit ba1062a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const (

var (
defaultFCMEndpoint = gcm.GcmSendEndpoint
defaultFCMMetrics = true
defaultAPNSMetrics = true
environments = []string{development, integration, preproduction, production}
)

Expand Down Expand Up @@ -153,6 +155,7 @@ var (
Envar("GUBLE_FCM_PREFIX").
Default("/fcm/").
String(),
IntervalMetrics: &defaultFCMMetrics,
},
APNS: apns.Config{
Enabled: kingpin.Flag("apns", "Enable the APNS connector (by default, in Development mode)").
Expand Down Expand Up @@ -181,6 +184,7 @@ var (
Default(strconv.Itoa(runtime.NumCPU())).
Envar("GUBLE_APNS_WORKERS").
Int(),
IntervalMetrics: &defaultAPNSMetrics,
},
Cluster: ClusterConfig{
NodeID: kingpin.Flag("node-id", "(cluster mode) This guble node's own ID: a strictly positive integer number which must be unique in cluster").
Expand Down
1 change: 0 additions & 1 deletion server/fcm_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ func serviceSetUp(t *testing.T) (*service.Service, func()) {
*Config.FCM.APIKey = "WILL BE OVERWRITTEN"
*Config.FCM.Prefix = "/fcm/"
*Config.FCM.Workers = 1 // use only one worker so we can control the number of messages that go to FCM
*Config.FCM.IntervalMetrics = true
*Config.APNS.Enabled = false

var s *service.Service
Expand Down

0 comments on commit ba1062a

Please sign in to comment.