Skip to content

Commit ada7b81

Browse files
Merge remote-tracking branch 'origin/master' into upadte-changelog-for-event-with-ampersand-fix
2 parents 7bdac54 + 6d60902 commit ada7b81

File tree

7 files changed

+51
-56
lines changed

7 files changed

+51
-56
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
## Version 25.03.xx
2+
Fixes:
3+
- [push] Fixed timeout setting
4+
25
Enterprise Fixes:
36
- [data-manager] Fixed bug when merging events with ampersand symbol in the name
47

58
## Version 25.03.25
69
Fixes:
710
- [crashes] Fixed resolving audit log recording
811
- [location] Fixed updating none gps coordinate location after gps location was used
9-
-
12+
1013
Enterprise Fixes:
1114
- [ab-testing] Add script for fixing variant cohort
1215
- [groups] Fix user permission update after updating user group permission
1316

14-
1517
## Version 25.03.24
1618
Fixes:
1719
- [jobs] Fix condition for scheduling alert job

package-lock.json

Lines changed: 33 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"ejs": "3.1.10",
6060
"errorhandler": "1.5.1",
6161
"express": "4.21.2",
62-
"express-rate-limit": "8.1.0",
62+
"express-rate-limit": "8.2.0",
6363
"express-session": "1.18.2",
6464
"form-data": "^4.0.0",
6565
"formidable": "2.1.3",

plugins/push/api/api.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ plugins.setConfigs(FEATURE_NAME, {
6565
pool_concurrency: 5, // max number of same type connections
6666
pool_pools: 10, // max number of connections in total
6767
default_content_available: false, // sets content-available: 1 by default for ios
68+
message_timeout: 3600000, // timeout for a message not sent yet (for TooLateToSend error)
6869
});
6970

7071
plugins.internalEvents.push('[CLY]_push_sent');

plugins/push/api/jobs/util/connector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class Connector extends DoFinish {
169169
}
170170
}, callback);
171171
}
172-
else if (push._id.getTimestamp().getTime() < Date.now() - 3600000) {
172+
else if (push._id.getTimestamp().getTime() < (Date.now() - this.state.cfg.message_timeout)) {
173173
this.tooLateToSend.addAffected(push._id, 1);
174174
this.do_flush(callback, true);
175175
return;

plugins/push/api/send/sender.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,29 @@ class Sender {
119119
auth: !(plugins.push.proxyunauthorized || false),
120120
};
121121
}
122+
if (plugins.push.message_timeout) {
123+
if (typeof plugins.push.message_timeout === "number") {
124+
cfg.message_timeout = plugins.push.message_timeout;
125+
}
126+
else {
127+
common.log(`push:send`).w('Invalid message timeout configuration: %j', plugins.push.message_timeout);
128+
}
129+
}
122130
}
123131

124132
return cfg;
125133
}
126134

127135
/**
128-
* Watch push collection for pushes to send,
136+
* Watch push collection for pushes to send,
129137
*/
130138
async watch() {
131139
let oid = dbext.oidBlankWithDate(new Date()),
132140
count = await common.db.collection('push').count({_id: {$lte: oid}});
133141
return count > 0;
134142
}
135143
// /**
136-
// * Watch push collection for pushes to send,
144+
// * Watch push collection for pushes to send,
137145
// */
138146
// async watch() {
139147
// let oid = dbext.oidBlankWithDate(new Date());

plugins/push/frontend/public/localization/push.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ push.pool_pushes = Number of notifications in stream batches
394394
push.pool_bytes = Bytes in binary stream batches
395395
push.pool_concurrency = Maximum number of same type connections
396396
push.pool_pools = Maximum number of connections in total
397+
push.message_timeout = Timeout of a message to be send (in milliseconds)
397398
push.default_content_available = Set content-available to 1 by default for IOS
398399

399400
#Drawer from other views

0 commit comments

Comments
 (0)