Skip to content

Commit 58f436b

Browse files
committed
lint project
1 parent eb84675 commit 58f436b

55 files changed

Lines changed: 5303 additions & 5316 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

autoadmin-ws-server/src/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { config, validateConfig } from './config.js';
55
import { setupWebSocketServer } from './handlers/websocket.js';
66
import { logger } from './utils/logger.js';
77

8-
// Validate configuration
98
try {
109
validateConfig();
1110
} catch (error) {
@@ -16,7 +15,6 @@ try {
1615

1716
const app = createApp();
1817

19-
// Create HTTP server for Hono
2018
const httpServer = serve({
2119
fetch: app.fetch,
2220
port: config.httpPort,
@@ -36,11 +34,9 @@ wsHttpServer.listen(config.wsPort, () => {
3634
logger.info({ port: config.wsPort }, 'WebSocket server started');
3735
});
3836

39-
// Graceful shutdown
4037
const shutdown = (signal: string) => {
4138
logger.info({ signal }, 'Shutdown signal received');
4239

43-
// Close WebSocket server
4440
wss.close(() => {
4541
logger.info('WebSocket server closed');
4642
});
@@ -49,12 +45,10 @@ const shutdown = (signal: string) => {
4945
logger.info('WebSocket HTTP server closed');
5046
});
5147

52-
// Close HTTP server
5348
httpServer.close(() => {
5449
logger.info('HTTP server closed');
5550
});
5651

57-
// Give connections time to close gracefully
5852
setTimeout(() => {
5953
logger.info('Forcing shutdown');
6054
process.exit(0);
@@ -64,7 +58,6 @@ const shutdown = (signal: string) => {
6458
process.on('SIGTERM', () => shutdown('SIGTERM'));
6559
process.on('SIGINT', () => shutdown('SIGINT'));
6660

67-
// Handle uncaught errors
6861
process.on('uncaughtException', (error) => {
6962
logger.fatal({ error: error.message, stack: error.stack }, 'Uncaught exception');
7063
process.exit(1);

shared-code/src/caching/caching-constants.ts

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,79 @@ import { Database } from 'ibm_db';
33
import { MongoClientDB } from '../data-access-layer/data-access-objects/data-access-object-mongodb.js';
44
import { Client } from 'cassandra-driver';
55
export const CACHING_CONSTANTS = {
6-
DEFAULT_CONNECTION_CACHE_OPTIONS: {
7-
max: 150,
8-
ttl: 1000 * 60 * 60,
9-
updateAgeOnGet: false,
10-
updateAgeOnHas: false,
11-
dispose: async (knex: Knex) => {
12-
await knex.destroy();
13-
},
14-
},
6+
DEFAULT_CONNECTION_CACHE_OPTIONS: {
7+
max: 150,
8+
ttl: 1000 * 60 * 60,
9+
updateAgeOnGet: false,
10+
updateAgeOnHas: false,
11+
dispose: async (knex: Knex) => {
12+
await knex.destroy();
13+
},
14+
},
1515

16-
DEFAULT_IMDB_DB2_CACHE_OPTIONS: {
17-
max: 150,
18-
ttl: 1000 * 60 * 60,
19-
updateAgeOnGet: false,
20-
updateAgeOnHas: false,
21-
dispose: async (db: Database) => {
22-
await db.close();
23-
},
24-
},
16+
DEFAULT_IMDB_DB2_CACHE_OPTIONS: {
17+
max: 150,
18+
ttl: 1000 * 60 * 60,
19+
updateAgeOnGet: false,
20+
updateAgeOnHas: false,
21+
dispose: async (db: Database) => {
22+
await db.close();
23+
},
24+
},
2525

26-
DEFAULT_CASSANDRA_CLIENT_CACHE_OPTIONS: {
27-
max: 150,
28-
ttl: 1000 * 60 * 60,
29-
updateAgeOnGet: false,
30-
updateAgeOnHas: false,
31-
dispose: async (client: Client) => {
32-
try {
33-
await client.shutdown();
34-
} catch (_e) {
35-
return;
36-
}
37-
},
38-
},
26+
DEFAULT_CASSANDRA_CLIENT_CACHE_OPTIONS: {
27+
max: 150,
28+
ttl: 1000 * 60 * 60,
29+
updateAgeOnGet: false,
30+
updateAgeOnHas: false,
31+
dispose: async (client: Client) => {
32+
try {
33+
await client.shutdown();
34+
} catch (_e) {
35+
return;
36+
}
37+
},
38+
},
3939

40-
DEFAULT_MONGO_DB_CACHE_OPTIONS: {
41-
max: 150,
42-
ttl: 1000 * 60 * 60,
43-
updateAgeOnGet: false,
44-
updateAgeOnHas: false,
45-
dispose: async (connectionData: MongoClientDB) => {
46-
await connectionData.dbClient.close();
47-
},
48-
},
40+
DEFAULT_MONGO_DB_CACHE_OPTIONS: {
41+
max: 150,
42+
ttl: 1000 * 60 * 60,
43+
updateAgeOnGet: false,
44+
updateAgeOnHas: false,
45+
dispose: async (connectionData: MongoClientDB) => {
46+
await connectionData.dbClient.close();
47+
},
48+
},
4949

50-
DEFAULT_REDIS_CLIENT_CACHE_OPTIONS: {
51-
max: 150,
52-
ttl: 1000 * 60 * 60,
53-
updateAgeOnGet: false,
54-
updateAgeOnHas: false,
55-
dispose: async (client: any) => {
56-
try {
57-
await client.quit();
58-
} catch (_e) {
59-
return;
60-
}
61-
},
62-
},
50+
DEFAULT_REDIS_CLIENT_CACHE_OPTIONS: {
51+
max: 150,
52+
ttl: 1000 * 60 * 60,
53+
updateAgeOnGet: false,
54+
updateAgeOnHas: false,
55+
dispose: async (client: any) => {
56+
try {
57+
await client.quit();
58+
} catch (_e) {
59+
return;
60+
}
61+
},
62+
},
6363

64-
DEFAULT_TUNNEL_CACHE_OPTIONS: {
65-
max: 100,
66-
ttl: 1000 * 60 * 60,
67-
dispose: async (tnl: any) => {
68-
try {
69-
await tnl?.server?.close();
70-
await tnl?.client?.destroy();
71-
await tnl?.database?.close();
72-
} catch (e) {
73-
console.error('Tunnel closing error: ' + e);
74-
}
75-
},
76-
},
77-
DEFAULT_TABLE_STRUCTURE_ELEMENTS_CACHE_OPTIONS: {
78-
max: 150,
79-
ttl: 1000 * 60,
80-
},
64+
DEFAULT_TUNNEL_CACHE_OPTIONS: {
65+
max: 100,
66+
ttl: 1000 * 60 * 60,
67+
dispose: async (tnl: any) => {
68+
try {
69+
await tnl?.server?.close();
70+
await tnl?.client?.destroy();
71+
await tnl?.database?.close();
72+
} catch (e) {
73+
console.error('Tunnel closing error: ' + e);
74+
}
75+
},
76+
},
77+
DEFAULT_TABLE_STRUCTURE_ELEMENTS_CACHE_OPTIONS: {
78+
max: 150,
79+
ttl: 1000 * 60,
80+
},
8181
};

0 commit comments

Comments
 (0)