chore: make cache config follow slack notification config
Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
@@ -20,7 +20,9 @@ notifications:
|
||||
sender: 'sender@mycompany.com'
|
||||
replyTo: 'no-reply@mycompany.com'
|
||||
broadcastConfig:
|
||||
receiver: 'user'
|
||||
receiver: 'users'
|
||||
cache:
|
||||
ttl: 60000
|
||||
```
|
||||
|
||||
See `config.d.ts` for more options for configuration.
|
||||
|
||||
+6
-4
@@ -105,10 +105,12 @@ export interface Config {
|
||||
*/
|
||||
receiverEmails?: string[];
|
||||
};
|
||||
/**
|
||||
* Email cache TTL, defaults to 1 hour
|
||||
*/
|
||||
cacheTtl?: number;
|
||||
cache?: {
|
||||
/**
|
||||
* Email cache TTL, defaults to 1 hour
|
||||
*/
|
||||
ttl?: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ export class NotificationsEmailProcessor implements NotificationProcessor {
|
||||
config.getOptionalString('notifications.email.format') ?? 'html';
|
||||
this.replyTo = config.getOptionalString('notifications.email.replyTo');
|
||||
this.cacheTtl =
|
||||
config.getOptionalNumber('notifications.email.cacheTtl') ?? 3_600_000;
|
||||
config.getOptionalNumber('notifications.email.cache.ttl') ?? 3_600_000;
|
||||
}
|
||||
|
||||
private async getTransporter() {
|
||||
|
||||
Reference in New Issue
Block a user