[IMPROVE] Make push notification batchsize and interval configurable (#15804)

pull/15442/head
Exordian 6 years ago committed by Diego Sampaio
parent 5340702f73
commit d2e741cc10
  1. 18
      app/lib/server/startup/settings.js
  2. 2
      packages/rocketchat-i18n/i18n/en.i18n.json
  3. 4
      server/lib/cordova.js

@ -1166,6 +1166,24 @@ settings.addGroup('Push', function() {
value: true,
},
});
this.add('Push_send_interval', 5000, {
type: 'int',
public: true,
alert: 'Push_Setting_Requires_Restart_Alert',
enableQuery: {
_id: 'Push_enable',
value: true,
},
});
this.add('Push_send_batch_size', 10, {
type: 'int',
public: true,
alert: 'Push_Setting_Requires_Restart_Alert',
enableQuery: {
_id: 'Push_enable',
value: true,
},
});
this.add('Push_enable_gateway', true, {
type: 'boolean',
alert: 'Push_Setting_Requires_Restart_Alert',

@ -2532,6 +2532,8 @@
"Push_apn_key": "APN Key",
"Push_apn_passphrase": "APN Passphrase",
"Push_debug": "Debug",
"Push_send_interval": "Interval to check the queue for new push notifications",
"Push_send_batch_size": "Batch size to be processed every tick",
"Push_enable": "Enable",
"Push_enable_gateway": "Enable Gateway",
"Push_gateway": "Gateway",

@ -176,8 +176,8 @@ function configurePush() {
apn,
gcm,
production: settings.get('Push_production'),
sendInterval: 5000,
sendBatchSize: 10,
sendInterval: settings.get('Push_send_interval'),
sendBatchSize: settings.get('Push_send_batch_size'),
});
if (settings.get('Push_enable_gateway') === true) {

Loading…
Cancel
Save