add 30 days ttl
This commit is contained in:
parent
1086b69595
commit
51db573030
@ -8,6 +8,7 @@ export class StorageService {
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
const uri = process.env[`STORAGE_URI`];
|
const uri = process.env[`STORAGE_URI`];
|
||||||
|
const ttl = 2592000; // 30 days
|
||||||
if (!uri) {
|
if (!uri) {
|
||||||
this.logger.warn(
|
this.logger.warn(
|
||||||
`STORAGE_URI is undefined, will use non persistant in memory storage`,
|
`STORAGE_URI is undefined, will use non persistant in memory storage`,
|
||||||
@ -18,6 +19,7 @@ export class StorageService {
|
|||||||
const keyv = new Keyv({
|
const keyv = new Keyv({
|
||||||
uri,
|
uri,
|
||||||
namespace,
|
namespace,
|
||||||
|
ttl,
|
||||||
});
|
});
|
||||||
keyv.on('error', (err) =>
|
keyv.on('error', (err) =>
|
||||||
this.logger.error(`Connection Error for namespace ${namespace}`, err),
|
this.logger.error(`Connection Error for namespace ${namespace}`, err),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user