feat: make polling interval configurable via lettabot.yaml (#181)

Add `pollIntervalSec` to the Google integration config so the email
polling interval can be set in lettabot.yaml instead of requiring
the POLLING_INTERVAL_MS environment variable.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Gabriele Sarti
2026-02-06 13:50:22 -05:00
committed by GitHub
parent 8cd48d9f54
commit b1e1b5693c
2 changed files with 4 additions and 0 deletions

View File

@@ -173,6 +173,9 @@ export function configToEnv(config: LettaBotConfig): Record<string, string> {
if (config.integrations?.google?.enabled && config.integrations.google.account) {
env.GMAIL_ACCOUNT = config.integrations.google.account;
}
if (config.integrations?.google?.pollIntervalSec) {
env.POLLING_INTERVAL_MS = String(config.integrations.google.pollIntervalSec * 1000);
}
if (config.attachments?.maxMB !== undefined) {
env.ATTACHMENTS_MAX_MB = String(config.attachments.maxMB);

View File

@@ -121,6 +121,7 @@ export interface GoogleConfig {
enabled: boolean;
account?: string;
services?: string[]; // e.g., ['gmail', 'calendar', 'drive', 'contacts', 'docs', 'sheets']
pollIntervalSec?: number; // Polling interval in seconds (default: 60)
}
// Default config