add refreshExpiryTimeout function

on clsi all data lives inside of / dir
dynamically reduce size of EXPIRY_TIMEOUT if disk starts to get full
This commit is contained in:
Henry Oswald
2020-05-11 10:29:16 +01:00
parent 7254a025ae
commit c004d299c1
5 changed files with 102 additions and 5 deletions

8
app.js
View File

@@ -359,10 +359,10 @@ if (!module.parent) {
module.exports = app
setInterval(
() => ProjectPersistenceManager.clearExpiredProjects(),
(tenMinutes = 10 * 60 * 1000)
)
setInterval(() => {
ProjectPersistenceManager.refreshExpiryTimeout()
ProjectPersistenceManager.clearExpiredProjects()
}, (tenMinutes = 10 * 60 * 1000))
function __guard__(value, transform) {
return typeof value !== 'undefined' && value !== null