feat: prepare DB for shared access (WAL, service partitioning)
Phase 0-2 of data unification: - Enable WAL mode + busy_timeout for safe concurrent access - router_state: keys prefixed with SERVICE_ID (lazy migration) - sessions: composite PK (group_folder, agent_type) - registered_groups: filtered by SERVICE_AGENT_TYPE on load - Logger: service name tag for unified log streams All changes are backward-compatible with the current split setup. Actual directory merge (Phase 3-4) is a separate step.
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
ASSISTANT_NAME,
|
||||
IDLE_TIMEOUT,
|
||||
POLL_INTERVAL,
|
||||
SERVICE_AGENT_TYPE,
|
||||
STATUS_CHANNEL_ID,
|
||||
STATUS_UPDATE_INTERVAL,
|
||||
TIMEZONE,
|
||||
@@ -82,7 +83,7 @@ function loadState(): void {
|
||||
lastAgentTimestamp = {};
|
||||
}
|
||||
sessions = getAllSessions();
|
||||
registeredGroups = getAllRegisteredGroups();
|
||||
registeredGroups = getAllRegisteredGroups(SERVICE_AGENT_TYPE);
|
||||
logger.info(
|
||||
{ groupCount: Object.keys(registeredGroups).length },
|
||||
'State loaded',
|
||||
|
||||
Reference in New Issue
Block a user