Skip to content
Snippets Groups Projects

Update firebase error handling for more info & better handling

Files

+ 9
6
@@ -71,14 +71,17 @@ var rootCmd = &cobra.Command{
@@ -71,14 +71,17 @@ var rootCmd = &cobra.Command{
}
}
viper.SetDefault("notificationRate", 30)
viper.SetDefault("notificationRate", 30)
viper.SetDefault("notificationsPerBatch", 20)
viper.SetDefault("notificationsPerBatch", 20)
 
// This is set to approx. 90% of the stated limit (4096)
 
viper.SetDefault("maxNotificationPayload", 3686)
// Populate params
// Populate params
NotificationParams = notifications.Params{
NotificationParams = notifications.Params{
Address: localAddress,
Address: localAddress,
CertPath: certPath,
CertPath: certPath,
KeyPath: keyPath,
KeyPath: keyPath,
FBCreds: fbCreds,
FBCreds: fbCreds,
NotificationRate: viper.GetInt("notificationRate"),
NotificationRate: viper.GetInt("notificationRate"),
NotificationsPerBatch: viper.GetInt("notificationsPerBatch"),
NotificationsPerBatch: viper.GetInt("notificationsPerBatch"),
 
MaxNotificationPayload: viper.GetInt("maxNotificationPayload"),
APNS: notifications.APNSParams{
APNS: notifications.APNSParams{
KeyPath: apnsKeyPath,
KeyPath: apnsKeyPath,
KeyID: viper.GetString("apnsKeyID"),
KeyID: viper.GetString("apnsKeyID"),
Loading