Skip to content

Commit 69b91d1

Browse files
Configurable timeouts via environment variables in isolation.ts (#68)
1 parent eca93b9 commit 69b91d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/sandbox/container_src/isolation.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ import type { ProcessRecord, ProcessStatus } from './types';
3535
// Configuration constants
3636
const CONFIG = {
3737
// Timeouts (in milliseconds)
38-
COMMAND_TIMEOUT_MS: 30000, // 30 seconds for command execution
3938
READY_TIMEOUT_MS: 5000, // 5 seconds for control process to initialize
40-
CLEANUP_INTERVAL_MS: 30000, // Run cleanup every 30 seconds
41-
TEMP_FILE_MAX_AGE_MS: 60000, // Delete temp files older than 60 seconds
4239
SHUTDOWN_GRACE_PERIOD_MS: 500, // Grace period for cleanup on shutdown
40+
COMMAND_TIMEOUT_MS: parseInt(process.env.COMMAND_TIMEOUT_MS || '30000'), // 30 seconds for command execution
41+
CLEANUP_INTERVAL_MS: parseInt(process.env.CLEANUP_INTERVAL_MS || '30000'), // Run cleanup every 30 seconds
42+
TEMP_FILE_MAX_AGE_MS: parseInt(process.env.TEMP_FILE_MAX_AGE_MS || '60000'), // Delete temp files older than 60 seconds
4343

4444
// Default paths
4545
DEFAULT_CWD: '/workspace',
@@ -1036,4 +1036,4 @@ export class SessionManager {
10361036
}
10371037
this.sessions.clear();
10381038
}
1039-
}
1039+
}

0 commit comments

Comments
 (0)