Add client configurable timeouts

This commit is contained in:
Andrey Sobolev
2025-09-30 13:42:02 +07:00
parent 4a42425301
commit 5d7ed6a4ff
7 changed files with 88 additions and 14 deletions
+7 -1
View File
@@ -1,5 +1,11 @@
// Check if we're in Node.js development mode
const isDevelopment = typeof process !== 'undefined' && process.env?.NODE_ENV === 'development'
// In development mode with Node.js, use a huge timeout (1 hour) to allow for debugging
const devAliveTimeout = 3600 // 1 hour in seconds
export const timeouts = {
aliveTimeout: 3, // seconds - timeout for detecting dead agents/clients
aliveTimeout: isDevelopment ? devAliveTimeout : 3, // seconds - timeout for detecting dead agents/clients
unusedContainerTimeout: 5, // 10 seconds for container to be terminated because of being unused
pingInterval: 1 // seconds - how often to ping agents
}