Add setting default NOTIFICATION_TRAY_AFTER_READ_DAYS_BEFORE_REMOVE=2

to all Wekan platforms https://github.com/wekan/wekan/pull/2998

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2020-04-08 23:16:48 +03:00
parent 115701fa65
commit 5ebb47cb0e
12 changed files with 100 additions and 62 deletions

View file

@ -931,7 +931,8 @@ if (Meteor.isServer) {
const addCronJob = _.debounce(
Meteor.bindEnvironment(function notificationCleanupDebounced() {
// passed in the removeAge has to be a number standing for the number of days after a notification is read before we remove it
const envRemoveAge = process.env.NOTIFICATION_REMOVAL_AGE;
const envRemoveAge =
process.env.NOTIFICATION_TRAY_AFTER_READ_DAYS_BEFORE_REMOVE;
// default notifications will be removed 2 days after they are read
const defaultRemoveAge = 2;
const removeAge = parseInt(envRemoveAge, 10) || defaultRemoveAge;