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:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user