Mnovich/temporal foreground tasks (#2895)

Co-authored-by: Carlos M. Lopez <carlopez@squareup.com>
This commit is contained in:
Max Novich
2025-06-20 16:19:58 -07:00
committed by GitHub
parent b3aed4bc11
commit 180b1df25d
58 changed files with 4009 additions and 1920 deletions
+13
View File
@@ -8,10 +8,13 @@ export interface EnvToggles {
GOOSE_SERVER__COMPUTER_CONTROLLER: boolean;
}
export type SchedulingEngine = 'builtin-cron' | 'temporal';
export interface Settings {
envToggles: EnvToggles;
showMenuBarIcon: boolean;
showDockIcon: boolean;
schedulingEngine: SchedulingEngine;
showQuitConfirmation: boolean;
}
@@ -25,6 +28,7 @@ const defaultSettings: Settings = {
},
showMenuBarIcon: true,
showDockIcon: true,
schedulingEngine: 'builtin-cron',
showQuitConfirmation: true,
};
@@ -64,6 +68,15 @@ export function updateEnvironmentVariables(envToggles: EnvToggles): void {
}
}
export function updateSchedulingEngineEnvironment(schedulingEngine: SchedulingEngine): void {
// Set GOOSE_SCHEDULER_TYPE based on the scheduling engine setting
if (schedulingEngine === 'temporal') {
process.env.GOOSE_SCHEDULER_TYPE = 'temporal';
} else {
process.env.GOOSE_SCHEDULER_TYPE = 'legacy';
}
}
// Menu management
export function createEnvironmentMenu(
envToggles: EnvToggles,