This commit is contained in:
Jarek Krochmalski committed 2026-01-11 07:16:18 +01:00
1 parent bd7b832394
commit 7643807717
86 files changed
+3644 -1385

No files matched your search

+38 -1
View File
@@ -102,7 +102,12 @@ export interface ShutdownCommand {
type: 'shutdown';
}
export type MainProcessCommand = RefreshEnvironmentsCommand | ShutdownCommand;
export interface UpdateIntervalCommand {
type: 'update_interval';
intervalMs: number;
}
export type MainProcessCommand = RefreshEnvironmentsCommand | ShutdownCommand | UpdateIntervalCommand;
// Subprocess configuration
interface SubprocessConfig {
@@ -198,6 +203,20 @@ class SubprocessManager {
this.sendToEvents({ type: 'refresh_environments' });
}
/**
* Send message to metrics subprocess
*/
sendToMetricsSubprocess(message: MainProcessCommand): void {
this.sendToMetrics(message);
}
/**
* Send message to events subprocess
*/
sendToEventsSubprocess(message: MainProcessCommand): void {
this.sendToEvents(message);
}
/**
* Start the metrics collection subprocess
*/
@@ -591,3 +610,21 @@ export function refreshSubprocessEnvironments(): void {
manager.refreshEnvironments();
}
}
/**
* Send message to event subprocess
*/
export function sendToEventSubprocess(message: MainProcessCommand): void {
if (manager) {
manager.sendToEventsSubprocess(message);
}
}
/**
* Send message to metrics subprocess
*/
export function sendToMetricsSubprocess(message: MainProcessCommand): void {
if (manager) {
manager.sendToMetricsSubprocess(message);
}
}