fix: improve plugins functionality with server management

This commit is contained in:
2026-04-29 20:33:54 +02:00
parent b8f6d58d99
commit fa2cca6fa4
82 changed files with 1708 additions and 303 deletions

View File

@@ -8,6 +8,7 @@ import {
MessageEntity,
UserEntity,
RoomEntity,
RoomOwnerEntity,
RoomChannelEntity,
RoomMemberEntity,
RoomRoleEntity,
@@ -27,8 +28,18 @@ let dbBackupPath = '';
// SQLite files start with this 16-byte header string.
const SQLITE_MAGIC = 'SQLite format 3\0';
const SAVE_RETRY_DELAYS_MS = [25, 75, 150, 300, 600];
const RETRYABLE_SAVE_ERROR_CODES = new Set(['EPERM', 'EACCES', 'EBUSY']);
const SAVE_RETRY_DELAYS_MS = [
25,
75,
150,
300,
600
];
const RETRYABLE_SAVE_ERROR_CODES = new Set([
'EPERM',
'EACCES',
'EBUSY'
]);
let saveQueue: Promise<void> = Promise.resolve();
@@ -164,6 +175,7 @@ export async function initializeDatabase(): Promise<void> {
MessageEntity,
UserEntity,
RoomEntity,
RoomOwnerEntity,
RoomChannelEntity,
RoomMemberEntity,
RoomRoleEntity,