simplified a lot of stuff
This commit is contained in:
parent
b845a8eade
commit
885b484a37
20 changed files with 360 additions and 1335 deletions
35
libs/core/shutdown/src/constants.ts
Normal file
35
libs/core/shutdown/src/constants.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* Core constants used across the stock-bot application
|
||||
*/
|
||||
|
||||
// Cache constants
|
||||
export const CACHE_DEFAULTS = {
|
||||
TTL: 3600, // 1 hour in seconds
|
||||
KEY_PREFIX: 'cache:',
|
||||
SCAN_COUNT: 100,
|
||||
} as const;
|
||||
|
||||
// Redis connection constants
|
||||
export const REDIS_DEFAULTS = {
|
||||
DB: 0,
|
||||
MAX_RETRIES: 3,
|
||||
RETRY_DELAY: 100,
|
||||
CONNECT_TIMEOUT: 10000,
|
||||
COMMAND_TIMEOUT: 5000,
|
||||
KEEP_ALIVE: 0,
|
||||
} as const;
|
||||
|
||||
// Shutdown constants
|
||||
export const SHUTDOWN_DEFAULTS = {
|
||||
TIMEOUT: 30000, // 30 seconds
|
||||
HIGH_PRIORITY: 10,
|
||||
MEDIUM_PRIORITY: 50,
|
||||
LOW_PRIORITY: 90,
|
||||
} as const;
|
||||
|
||||
// Pool size constants
|
||||
export const POOL_SIZE_DEFAULTS = {
|
||||
MIN_POOL_SIZE: 2,
|
||||
MAX_POOL_SIZE: 10,
|
||||
CPU_MULTIPLIER: 2,
|
||||
} as const;
|
||||
Loading…
Add table
Add a link
Reference in a new issue